diff options
| author | Ilya Kitaev <mbg033@gmail.com> | 2016-10-07 00:47:28 +0300 |
|---|---|---|
| committer | Ilya Kitaev <mbg033@gmail.com> | 2016-10-10 00:19:13 +0300 |
| commit | 0498c3ba64ace2bd8898a5d0ba3107a2f024c692 (patch) | |
| tree | beb2d8e596eb5632ebcd1efcabcfdf75a299774b /src/libwalletqt/Wallet.cpp | |
| parent | defc2a414abe6df837682d1472db0272f0b55eca (diff) | |
| download | monzero-gui-0498c3ba64ace2bd8898a5d0ba3107a2f024c692.tar.gz monzero-gui-0498c3ba64ace2bd8898a5d0ba3107a2f024c692.tar.xz monzero-gui-0498c3ba64ace2bd8898a5d0ba3107a2f024c692.zip | |
Transaction history is not crashing and refreshing properly
Diffstat (limited to 'src/libwalletqt/Wallet.cpp')
| -rw-r--r-- | src/libwalletqt/Wallet.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 39d40a17..14e0a868 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -32,7 +32,6 @@ public: virtual void moneyReceived(const std::string &txId, uint64_t amount) { - qDebug() << __FUNCTION__; emit m_wallet->moneyReceived(QString::fromStdString(txId), amount); } @@ -40,14 +39,12 @@ public: virtual void newBlock(uint64_t height) { // qDebug() << __FUNCTION__; - m_wallet->m_history->refresh(); emit m_wallet->newBlock(height); } virtual void updated() { qDebug() << __FUNCTION__; - m_wallet->m_history->refresh(); emit m_wallet->updated(); } @@ -55,7 +52,6 @@ public: virtual void refreshed() { qDebug() << __FUNCTION__; - emit m_wallet->refreshed(); } @@ -93,6 +89,11 @@ bool Wallet::connected() const return m_walletImpl->connected(); } +bool Wallet::synchronized() const +{ + return m_walletImpl->synchronized(); +} + QString Wallet::errorString() const { return QString::fromStdString(m_walletImpl->errorString()); @@ -207,19 +208,16 @@ void Wallet::disposeTransaction(PendingTransaction *t) delete t; } -TransactionHistory *Wallet::history() +TransactionHistory *Wallet::history() const { -// if (m_history->count() == 0) { -// m_history->refresh(); -// } - return m_history; } -TransactionHistoryModel *Wallet::historyModel() +TransactionHistoryModel *Wallet::historyModel() const { if (!m_historyModel) { - m_historyModel = new TransactionHistoryModel(this); + Wallet * w = const_cast<Wallet*>(this); + m_historyModel = new TransactionHistoryModel(w); m_historyModel->setTransactionHistory(this->history()); } |
