mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +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:
@@ -61,8 +61,6 @@ public:
|
||||
|
||||
/// Request core initialization
|
||||
void requestInitialize();
|
||||
/// Request core shutdown
|
||||
void requestShutdown();
|
||||
|
||||
/// Get process return value
|
||||
int getReturnValue() const { return returnValue; }
|
||||
@@ -77,7 +75,8 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info);
|
||||
void shutdownResult();
|
||||
/// Request core shutdown
|
||||
void requestShutdown();
|
||||
/// Handle runaway exceptions. Shows a message box with the problem and quits the program.
|
||||
void handleRunawayException(const QString &message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user