mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-22 09:50:49 +02: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
@ -65,7 +65,10 @@ WalletModel::~WalletModel()
|
|||||||
void WalletModel::startPollBalance()
|
void WalletModel::startPollBalance()
|
||||||
{
|
{
|
||||||
// This timer will be fired repeatedly to update the balance
|
// 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);
|
timer->start(MODEL_UPDATE_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,6 +223,8 @@ Q_SIGNALS:
|
|||||||
// Notify that there are now keys in the keypool
|
// Notify that there are now keys in the keypool
|
||||||
void canGetAddressesChanged();
|
void canGetAddressesChanged();
|
||||||
|
|
||||||
|
void timerTimeout();
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
/* Starts a timer to periodically update the balance */
|
/* Starts a timer to periodically update the balance */
|
||||||
void startPollBalance();
|
void startPollBalance();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user