mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge #17120: gui: Fix start timer from non QThread
a8f5026d6dgui: Fix start timer from non QThread (João Barbosa) Pull request description: Fixes #16296. ACKs for top commit: laanwj: code review ACKa8f5026d6dTree-SHA512: d7b05ac88e188de16cbbe80cb2f773b7976ee07ee876ac94a93f9351856c4f3a9d66a531d3f3748d2dccff8c8d77d9d8227433069ed5909c32be2efeaa32f655
This commit is contained in:
@@ -44,11 +44,6 @@ WalletModel::WalletModel(std::unique_ptr<interfaces::Wallet> wallet, interfaces:
|
||||
transactionTableModel = new TransactionTableModel(platformStyle, this);
|
||||
recentRequestsTableModel = new RecentRequestsTableModel(this);
|
||||
|
||||
// This timer will be fired repeatedly to update the balance
|
||||
pollTimer = new QTimer(this);
|
||||
connect(pollTimer, &QTimer::timeout, this, &WalletModel::pollBalanceChanged);
|
||||
pollTimer->start(MODEL_UPDATE_DELAY);
|
||||
|
||||
subscribeToCoreSignals();
|
||||
}
|
||||
|
||||
@@ -57,6 +52,14 @@ WalletModel::~WalletModel()
|
||||
unsubscribeFromCoreSignals();
|
||||
}
|
||||
|
||||
void WalletModel::startPollBalance()
|
||||
{
|
||||
// This timer will be fired repeatedly to update the balance
|
||||
QTimer* timer = new QTimer(this);
|
||||
connect(timer, &QTimer::timeout, this, &WalletModel::pollBalanceChanged);
|
||||
timer->start(MODEL_UPDATE_DELAY);
|
||||
}
|
||||
|
||||
void WalletModel::updateStatus()
|
||||
{
|
||||
EncryptionStatus newEncryptionStatus = getEncryptionStatus();
|
||||
|
||||
Reference in New Issue
Block a user