mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-20 04:36:08 +01:00
qt: Do not exit and re-enter main event loop during shutdown
This commit is contained in:
@@ -371,7 +371,7 @@ void BitcoinGUI::createActions()
|
||||
m_mask_values_action->setStatusTip(tr("Mask the values in the Overview tab"));
|
||||
m_mask_values_action->setCheckable(true);
|
||||
|
||||
connect(quitAction, &QAction::triggered, qApp, QApplication::quit);
|
||||
connect(quitAction, &QAction::triggered, this, &BitcoinGUI::quitRequested);
|
||||
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked);
|
||||
connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt);
|
||||
connect(optionsAction, &QAction::triggered, this, &BitcoinGUI::optionsClicked);
|
||||
@@ -991,6 +991,7 @@ void BitcoinGUI::openOptionsDialogWithTab(OptionsDialog::Tab tab)
|
||||
return;
|
||||
|
||||
auto dlg = new OptionsDialog(this, enableWallet);
|
||||
connect(dlg, &OptionsDialog::quitOnReset, this, &BitcoinGUI::quitRequested);
|
||||
dlg->setCurrentTab(tab);
|
||||
dlg->setModel(clientModel->getOptionsModel());
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
@@ -1216,7 +1217,7 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
|
||||
// close rpcConsole in case it was open to make some space for the shutdown window
|
||||
rpcConsole->close();
|
||||
|
||||
QApplication::quit();
|
||||
Q_EMIT quitRequested();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1410,7 +1411,7 @@ void BitcoinGUI::detectShutdown()
|
||||
{
|
||||
if(rpcConsole)
|
||||
rpcConsole->hide();
|
||||
qApp->quit();
|
||||
Q_EMIT quitRequested();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user