mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of QTimer methods
51250b0906refactor, qt: Use std::chrono for input_filter_delay constant (Hennadii Stepanov)f3bdc143b6refactor, qt: Add SHUTDOWN_POLLING_DELAY constant (Hennadii Stepanov)0e193deb52refactor, qt: Use std::chrono for non-zero arguments in QTimer methods (Hennadii Stepanov)6f0da95811refactor, qt: Use std::chrono in ConfirmMessage parameter (Hennadii Stepanov)33d520ac53refactor, 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 ACK51250b0906. shaavan: reACK51250b0906Tree-SHA512: aa843bb2322a84c0c2bb113d3b48d7bf02d7f09a770779dcde312c32887f973ef9445cdef42f39edaa599ff0f3d0457454f6153aa130efadd989e413d39c6062
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QMessageBox>
|
||||
@@ -259,12 +260,12 @@ void CreateWalletActivity::createWallet()
|
||||
flags |= WALLET_FLAG_EXTERNAL_SIGNER;
|
||||
}
|
||||
|
||||
QTimer::singleShot(500, worker(), [this, name, flags] {
|
||||
QTimer::singleShot(500ms, worker(), [this, name, flags] {
|
||||
std::unique_ptr<interfaces::Wallet> wallet = node().walletLoader().createWallet(name, m_passphrase, flags, m_error_message, m_warning_message);
|
||||
|
||||
if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet));
|
||||
|
||||
QTimer::singleShot(500, this, &CreateWalletActivity::finish);
|
||||
QTimer::singleShot(500ms, this, &CreateWalletActivity::finish);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user