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:
parent
0e193deb52
commit
f3bdc143b6
2 changed files with 4 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue