0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

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 2022-01-06 18:41:36 +02:00
parent 0e193deb52
commit f3bdc143b6
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
2 changed files with 4 additions and 1 deletions

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

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;