Avoid race conditions between dialogs on startup

This commit is contained in:
Vladimir Golovnev (Glassez)
2022-08-06 14:42:30 +03:00
parent 7f40602da9
commit 15515200ee
2 changed files with 18 additions and 17 deletions

View File

@@ -460,22 +460,6 @@ MainWindow::MainWindow(IGUIApplication *app, const State initialState)
connect(pref, &Preferences::changed, this, &MainWindow::optionsSaved);
qDebug("GUI Built");
#ifdef Q_OS_WIN
if (!pref->neverCheckFileAssoc() && (!Preferences::isTorrentFileAssocSet() || !Preferences::isMagnetLinkAssocSet()))
{
if (QMessageBox::question(this, tr("Torrent file association"),
tr("qBittorrent is not the default application for opening torrent files or Magnet links.\nDo you want to make qBittorrent the default application for these?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
{
Preferences::setTorrentFileAssoc(true);
Preferences::setMagnetLinkAssoc(true);
}
else
{
pref->setNeverCheckFileAssoc();
}
}
#endif
}
MainWindow::~MainWindow()