Skip to content

Commit 7b3b230

Browse files
committed
move-only: Define TransactionNotification before TransactionTablePriv
This is needed because next commit moves vQueueNotifications to TransactionTablePriv member.
1 parent 55b1ffc commit 7b3b230

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/qt/transactiontablemodel.cpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@ struct TxLessThan
5454
}
5555
};
5656

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+
5784
// Private implementation
5885
class TransactionTablePriv
5986
{
@@ -674,33 +701,6 @@ void TransactionTableModel::updateDisplayUnit()
674701
Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount));
675702
}
676703

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-
704704
static void NotifyTransactionChanged(TransactionTableModel *ttm, const uint256 &hash, ChangeType status)
705705
{
706706
// Find transaction in wallet

0 commit comments

Comments
 (0)