qt: Replace QCoreApplication::quit() with QCoreApplication::exit(0)

Qt 5:
 - no behavior change

Qt 6:
 - this change avoids sending a duplicated `QEvent::Quit`
This commit is contained in:
Hennadii Stepanov 2022-04-16 15:26:45 +02:00
parent d1b3dfb275
commit 252f363f2f
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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);
}
}