refactor, qt: Use std::chrono for non-zero arguments in QTimer methods

This commit is contained in:
Hennadii Stepanov
2022-01-06 18:35:53 +02:00
parent 6f0da95811
commit 0e193deb52
4 changed files with 12 additions and 7 deletions

View File

@@ -20,6 +20,7 @@
#include <wallet/wallet.h>
#include <algorithm>
#include <chrono>
#include <QApplication>
#include <QMessageBox>
@@ -254,12 +255,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);
});
}