mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
qt: Handle exceptions in WalletModel::pollBalanceChanged slot
Actually, the private QTimer::timeout signal has one QTimer::QPrivateSignal parameter.
This commit is contained in:
parent
eb6156ba1b
commit
bc00e13bc8
2 changed files with 6 additions and 1 deletions
|
@ -65,7 +65,10 @@ WalletModel::~WalletModel()
|
|||
void WalletModel::startPollBalance()
|
||||
{
|
||||
// This timer will be fired repeatedly to update the balance
|
||||
connect(timer, &QTimer::timeout, this, &WalletModel::pollBalanceChanged);
|
||||
// Since the QTimer::timeout is a private signal, it cannot be used
|
||||
// in the GUIUtil::ExceptionSafeConnect directly.
|
||||
connect(timer, &QTimer::timeout, this, &WalletModel::timerTimeout);
|
||||
GUIUtil::ExceptionSafeConnect(this, &WalletModel::timerTimeout, this, &WalletModel::pollBalanceChanged);
|
||||
timer->start(MODEL_UPDATE_DELAY);
|
||||
}
|
||||
|
||||
|
|
|
@ -223,6 +223,8 @@ Q_SIGNALS:
|
|||
// Notify that there are now keys in the keypool
|
||||
void canGetAddressesChanged();
|
||||
|
||||
void timerTimeout();
|
||||
|
||||
public Q_SLOTS:
|
||||
/* Starts a timer to periodically update the balance */
|
||||
void startPollBalance();
|
||||
|
|
Loading…
Add table
Reference in a new issue