@@ -54,6 +54,33 @@ struct TxLessThan
54
54
}
55
55
};
56
56
57
+ // queue notifications to show a non freezing progress dialog e.g. for rescan
58
+ struct TransactionNotification
59
+ {
60
+ public:
61
+ TransactionNotification () {}
62
+ TransactionNotification (uint256 _hash, ChangeType _status, bool _showTransaction):
63
+ hash (_hash), status(_status), showTransaction(_showTransaction) {}
64
+
65
+ void invoke (QObject *ttm)
66
+ {
67
+ QString strHash = QString::fromStdString (hash.GetHex ());
68
+ qDebug () << " NotifyTransactionChanged: " + strHash + " status= " + QString::number (status);
69
+ bool invoked = QMetaObject::invokeMethod (ttm, " updateTransaction" , Qt::QueuedConnection,
70
+ Q_ARG (QString, strHash),
71
+ Q_ARG (int , status),
72
+ Q_ARG (bool , showTransaction));
73
+ assert (invoked);
74
+ }
75
+ private:
76
+ uint256 hash;
77
+ ChangeType status;
78
+ bool showTransaction;
79
+ };
80
+
81
+ static bool fQueueNotifications = false ;
82
+ static std::vector< TransactionNotification > vQueueNotifications;
83
+
57
84
// Private implementation
58
85
class TransactionTablePriv
59
86
{
@@ -674,33 +701,6 @@ void TransactionTableModel::updateDisplayUnit()
674
701
Q_EMIT dataChanged (index (0 , Amount), index (priv->size ()-1 , Amount));
675
702
}
676
703
677
- // queue notifications to show a non freezing progress dialog e.g. for rescan
678
- struct TransactionNotification
679
- {
680
- public:
681
- TransactionNotification () {}
682
- TransactionNotification (uint256 _hash, ChangeType _status, bool _showTransaction):
683
- hash (_hash), status(_status), showTransaction(_showTransaction) {}
684
-
685
- void invoke (QObject *ttm)
686
- {
687
- QString strHash = QString::fromStdString (hash.GetHex ());
688
- qDebug () << " NotifyTransactionChanged: " + strHash + " status= " + QString::number (status);
689
- bool invoked = QMetaObject::invokeMethod (ttm, " updateTransaction" , Qt::QueuedConnection,
690
- Q_ARG (QString, strHash),
691
- Q_ARG (int , status),
692
- Q_ARG (bool , showTransaction));
693
- assert (invoked);
694
- }
695
- private:
696
- uint256 hash;
697
- ChangeType status;
698
- bool showTransaction;
699
- };
700
-
701
- static bool fQueueNotifications = false ;
702
- static std::vector< TransactionNotification > vQueueNotifications;
703
-
704
704
static void NotifyTransactionChanged (TransactionTableModel *ttm, const uint256 &hash, ChangeType status)
705
705
{
706
706
// Find transaction in wallet
0 commit comments