mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Prevent the new update box from blocking input on other dialogues
PR #16678.
This commit is contained in:
parent
e9364b72f9
commit
0c8220c9fd
1 changed files with 4 additions and 2 deletions
|
@ -1920,6 +1920,7 @@ void MainWindow::handleUpdateCheckFinished(ProgramUpdater *updater, const bool i
|
|||
msgBox->setAttribute(Qt::WA_DeleteOnClose);
|
||||
msgBox->setAttribute(Qt::WA_ShowWithoutActivating);
|
||||
msgBox->setDefaultButton(QMessageBox::Yes);
|
||||
msgBox->setWindowModality(Qt::NonModal);
|
||||
connect(msgBox, &QMessageBox::buttonClicked, this, [msgBox, updater](QAbstractButton *button)
|
||||
{
|
||||
if (msgBox->buttonRole(button) == QMessageBox::YesRole)
|
||||
|
@ -1928,7 +1929,7 @@ void MainWindow::handleUpdateCheckFinished(ProgramUpdater *updater, const bool i
|
|||
}
|
||||
});
|
||||
connect(msgBox, &QDialog::finished, this, cleanup);
|
||||
msgBox->open();
|
||||
msgBox->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1938,8 +1939,9 @@ void MainWindow::handleUpdateCheckFinished(ProgramUpdater *updater, const bool i
|
|||
, tr("No updates available.\nYou are already using the latest version.")
|
||||
, QMessageBox::Ok, this};
|
||||
msgBox->setAttribute(Qt::WA_DeleteOnClose);
|
||||
msgBox->setWindowModality(Qt::NonModal);
|
||||
connect(msgBox, &QDialog::finished, this, cleanup);
|
||||
msgBox->open();
|
||||
msgBox->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue