mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge bitcoin-core/gui#336: Do not exit and re-enter main event loop during shutdown
451ca244dbqt, refactor: Drop intermediate BitcoinApplication::shutdownResult slot (Hennadii Stepanov)f3a17bbe5fqt: Do not exit and re-enter main event loop during shutdown (Hennadii Stepanov)b4e0d2c431qt, refactor: Allocate SendConfirmationDialog instances on heap (Hennadii Stepanov)332dea2852qt, refactor: Keep HelpMessageDialog in the main event loop (Hennadii Stepanov)c8bae37a7aqt, refactor: Keep PSBTOperationsDialog in the main event loop (Hennadii Stepanov)7fa91e8312qt, refactor: Keep AskPassphraseDialog in the main event loop (Hennadii Stepanov)6f6fde30e7qt, refactor: Keep EditAddressDialog in the main event loop (Hennadii Stepanov)59f7ba4fd7qt, refactor: Keep CoinControlDialog in the main event loop (Hennadii Stepanov)7830cd0b35qt, refactor: Keep OptionsDialog in the main event loop (Hennadii Stepanov)13f618818dqt: Add GUIUtil::ShowModalDialogAndDeleteOnClose (Hennadii Stepanov) Pull request description: On master (1ef34ee25e) during shutdown `QApplication` exits the main event loop, then re-enter again. This PR streamlines shutdown process by removing the need to interrupt the main event loop, that is required for #59. Also, blocking [`QDialog::exec()`](https://doc.qt.io/qt-5/qdialog.html#exec) calls are replaced with safer [`QDialog::show()`](https://doc.qt.io/qt-5/qwidget.html#show), except for `SendConfirmationDialog` as that change is not trivial (marked as TODO). The [`QDialog::open()`](https://doc.qt.io/qt-5/qdialog.html#open) was not used because the actual modality mode (application modal or window modal) of a dialog depends on whether it has a parent. This PR does not change behavior, and all touched dialogs are still application modal. As a follow up, a design research could suggest to make some dialogs window modal. NOTE for reviewers: quitting app while a dialog is open (e.g., via systray icon menu) must work fine. ACKs for top commit: laanwj: Code review and lighly tested ACK451ca244dbpromag: ACK451ca244db, just changed signal to `quitRequested`. Tree-SHA512: ef01ab6ed803b202e776019a4e1f592e816f7bc786e00574b25a0bf16be2374ddf9db21f0a26da08700df7ef0ab9e879550df46dcfe3b6d940f5ed02ca5f8447
This commit is contained in:
@@ -182,14 +182,14 @@ void AddressBookPage::onEditAction()
|
||||
if(indexes.isEmpty())
|
||||
return;
|
||||
|
||||
EditAddressDialog dlg(
|
||||
auto dlg = new EditAddressDialog(
|
||||
tab == SendingTab ?
|
||||
EditAddressDialog::EditSendingAddress :
|
||||
EditAddressDialog::EditReceivingAddress, this);
|
||||
dlg.setModel(model);
|
||||
dlg->setModel(model);
|
||||
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
|
||||
dlg.loadRow(origIndex.row());
|
||||
dlg.exec();
|
||||
dlg->loadRow(origIndex.row());
|
||||
GUIUtil::ShowModalDialogAndDeleteOnClose(dlg);
|
||||
}
|
||||
|
||||
void AddressBookPage::on_newAddress_clicked()
|
||||
|
||||
Reference in New Issue
Block a user