refactor, qt: Add SHUTDOWN_POLLING_DELAY constant

A named constant is better for the code readability. Also it could be
reused in an alternative GUI implementation (e.g., QML-based).
This commit is contained in:
Hennadii Stepanov committed 2022-01-09 17:54:03 +02:00
1 parent 0e193deb52
commit f3bdc143b6
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -414,7 +414,7 @@ void BitcoinApplication::initializeResult(bool success, interfaces::BlockAndHead
QTimer::singleShot(100ms, paymentServer, &PaymentServer::uiReady);
}
#endif
pollShutdownTimer->start(200ms);
pollShutdownTimer->start(SHUTDOWN_POLLING_DELAY);
} else {
Q_EMIT splashFinished(); // Make sure splash screen doesn't stick around during shutdown
requestShutdown();
+3
View File
@@ -13,6 +13,9 @@ using namespace std::chrono_literals;
/* A delay between model updates */
static constexpr auto MODEL_UPDATE_DELAY{250ms};
/* A delay between shutdown pollings */
static constexpr auto SHUTDOWN_POLLING_DELAY{200ms};
/* AskPassphraseDialog -- Maximum passphrase length */
static const int MAX_PASSPHRASE_SIZE = 1024;