diff options
author | Scott Ellis <sje397@gmail.com> | 2012-07-06 01:43:28 +1000 |
---|---|---|
committer | Scott Ellis <sje397@gmail.com> | 2012-07-06 03:05:35 +1000 |
commit | 6c83a8419b3dd6aee2900803e2ee6e61781a16f8 (patch) | |
tree | 5ff5842ceb38f3e6ce934c6be47cdc2ad1257cd0 /src/qt/walletmodel.h | |
parent | fe70b09c428585166f1040e9023251c9c250e894 (diff) |
Add a timer to check for changes in immature or unconfirmed balances,
when these are non-zero. Fixed a minor mem leak.
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r-- | src/qt/walletmodel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index c973c5cf53..62558a49df 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -10,6 +10,10 @@ class AddressTableModel; class TransactionTableModel; class CWallet; +QT_BEGIN_NAMESPACE +class QTimer; +QT_END_NAMESPACE + class SendCoinsRecipient { public: @@ -120,9 +124,14 @@ private: qint64 cachedImmatureBalance; qint64 cachedNumTransactions; EncryptionStatus cachedEncryptionStatus; + int cachedNumBlocks; + + QTimer *pollTimer; void subscribeToCoreSignals(); void unsubscribeFromCoreSignals(); + void checkBalanceChanged(); + signals: // Signal that balance in wallet changed void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance); @@ -148,6 +157,8 @@ public slots: void updateTransaction(const QString &hash, int status); /* New, updated or removed address book entry */ void updateAddressBook(const QString &address, const QString &label, bool isMine, int status); + /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */ + void pollBalanceChanged(); }; |