mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
gui: Fix start timer from non QThread
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