mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-04-17 15:56:55 -04:00
Allow selecting multiple items in Network Error dialog
Signed-off-by: 0x189D7997 <199489335+0x189D7997@users.noreply.github.com>
This commit is contained in:
@@ -43,6 +43,8 @@ NetworkJobFailedDialog::NetworkJobFailedDialog(const QString& jobName, const int
|
||||
m_ui->detailsTable->header()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
m_ui->detailsTable->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
||||
|
||||
m_ui->detailsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
|
||||
const auto* copyShortcut = new QShortcut(QKeySequence::Copy, m_ui->detailsTable);
|
||||
connect(copyShortcut, &QShortcut::activated, this, &NetworkJobFailedDialog::copyUrl);
|
||||
|
||||
@@ -74,6 +76,11 @@ void NetworkJobFailedDialog::copyUrl() const
|
||||
return;
|
||||
}
|
||||
|
||||
QString urls = items.first()->text(0);
|
||||
for (auto& item : items.sliced(1)) {
|
||||
urls += "\n" + item->text(0);
|
||||
}
|
||||
|
||||
auto* clipboard = QGuiApplication::clipboard();
|
||||
clipboard->setText(items.first()->text(0));
|
||||
clipboard->setText(urls);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user