aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-04-16 15:26:45 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-05-21 16:57:31 +0200
commit252f363f2feff243cae47731d59dfa1b74dd4386 (patch)
tree4c4193c81db40e4fbcf7cf3bed0998c230a0c26c
parentd1b3dfb275fd98e37cfe8a0f7cea7d03595af2e8 (diff)
qt: Replace `QCoreApplication::quit()` with `QCoreApplication::exit(0)`
Qt 5: - no behavior change Qt 6: - this change avoids sending a duplicated `QEvent::Quit`
-rw-r--r--src/qt/bitcoin.cpp4
-rw-r--r--src/qt/test/apptests.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 8cac28400f..fa45e3908a 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -308,7 +308,9 @@ void BitcoinApplication::startThread()
/* communication to and from thread */
connect(&m_executor.value(), &InitExecutor::initializeResult, this, &BitcoinApplication::initializeResult);
- connect(&m_executor.value(), &InitExecutor::shutdownResult, this, &QCoreApplication::quit);
+ connect(&m_executor.value(), &InitExecutor::shutdownResult, this, [] {
+ QCoreApplication::exit(0);
+ });
connect(&m_executor.value(), &InitExecutor::runawayException, this, &BitcoinApplication::handleRunawayException);
connect(this, &BitcoinApplication::requestedInitialize, &m_executor.value(), &InitExecutor::initialize);
connect(this, &BitcoinApplication::requestedShutdown, &m_executor.value(), &InitExecutor::shutdown);
diff --git a/src/qt/test/apptests.cpp b/src/qt/test/apptests.cpp
index 099ac5fcae..447df572d6 100644
--- a/src/qt/test/apptests.cpp
+++ b/src/qt/test/apptests.cpp
@@ -119,6 +119,6 @@ AppTests::HandleCallback::~HandleCallback()
assert(it != callbacks.end());
callbacks.erase(it);
if (callbacks.empty()) {
- m_app_tests.m_app.quit();
+ m_app_tests.m_app.exit(0);
}
}