aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-01-12 14:56:52 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-01-12 14:59:24 +0200
commit16781e1bc9f8ffc721ebea73434e0066957bc959 (patch)
tree3167bb48da78cfe744d72da9026e1f03572524f1 /src/qt/bitcoin.cpp
parente0ae5418cb24e509138ea7cd07e8cbff553d1bad (diff)
parent51250b0906e56b39488304208ad119c951b4ae7d (diff)
downloadbitcoin-16781e1bc9f8ffc721ebea73434e0066957bc959.tar.xz
Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods
51250b0906e56b39488304208ad119c951b4ae7d refactor, qt: Use std::chrono for input_filter_delay constant (Hennadii Stepanov) f3bdc143b67e8a5e763071a0774f6d994ca35c57 refactor, qt: Add SHUTDOWN_POLLING_DELAY constant (Hennadii Stepanov) 0e193deb523a4fa04e0ee69bd66f917895802ac9 refactor, qt: Use std::chrono for non-zero arguments in QTimer methods (Hennadii Stepanov) 6f0da958116ecc0e06332fad2f490e37b6884166 refactor, qt: Use std::chrono in ConfirmMessage parameter (Hennadii Stepanov) 33d520ac538fcd6285fd958578f1bd26295592e4 refactor, qt: Use std::chrono for MODEL_UPDATE_DELAY constant (Hennadii Stepanov) Pull request description: Since Qt 5.8 `QTimer` methods have overloads that accept `std::chrono::milliseconds` arguments: - [`QTimer::singleShot`](https://doc.qt.io/archives/qt-5.9/qtimer.html#singleShot-8) - [`QTimer::start`](https://doc.qt.io/archives/qt-5.9/qtimer.html#start-2) ACKs for top commit: promag: Code review ACK 51250b0906e56b39488304208ad119c951b4ae7d. shaavan: reACK 51250b0906e56b39488304208ad119c951b4ae7d Tree-SHA512: aa843bb2322a84c0c2bb113d3b48d7bf02d7f09a770779dcde312c32887f973ef9445cdef42f39edaa599ff0f3d0457454f6153aa130efadd989e413d39c6062
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9f3dd42b56..6a2781079c 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -41,6 +41,7 @@
#endif // ENABLE_WALLET
#include <boost/signals2/connection.hpp>
+#include <chrono>
#include <memory>
#include <QApplication>
@@ -412,10 +413,10 @@ void BitcoinApplication::initializeResult(bool success, interfaces::BlockAndHead
connect(paymentServer, &PaymentServer::message, [this](const QString& title, const QString& message, unsigned int style) {
window->message(title, message, style);
});
- QTimer::singleShot(100, paymentServer, &PaymentServer::uiReady);
+ QTimer::singleShot(100ms, paymentServer, &PaymentServer::uiReady);
}
#endif
- pollShutdownTimer->start(200);
+ pollShutdownTimer->start(SHUTDOWN_POLLING_DELAY);
} else {
Q_EMIT splashFinished(); // Make sure splash screen doesn't stick around during shutdown
requestShutdown();