mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
move-only: Define TransactionNotification before TransactionTablePriv
This is needed because next commit moves vQueueNotifications to TransactionTablePriv member.
This commit is contained in:
@@ -54,6 +54,33 @@ struct TxLessThan
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// queue notifications to show a non freezing progress dialog e.g. for rescan
|
||||||
|
struct TransactionNotification
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TransactionNotification() {}
|
||||||
|
TransactionNotification(uint256 _hash, ChangeType _status, bool _showTransaction):
|
||||||
|
hash(_hash), status(_status), showTransaction(_showTransaction) {}
|
||||||
|
|
||||||
|
void invoke(QObject *ttm)
|
||||||
|
{
|
||||||
|
QString strHash = QString::fromStdString(hash.GetHex());
|
||||||
|
qDebug() << "NotifyTransactionChanged: " + strHash + " status= " + QString::number(status);
|
||||||
|
bool invoked = QMetaObject::invokeMethod(ttm, "updateTransaction", Qt::QueuedConnection,
|
||||||
|
Q_ARG(QString, strHash),
|
||||||
|
Q_ARG(int, status),
|
||||||
|
Q_ARG(bool, showTransaction));
|
||||||
|
assert(invoked);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
uint256 hash;
|
||||||
|
ChangeType status;
|
||||||
|
bool showTransaction;
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool fQueueNotifications = false;
|
||||||
|
static std::vector< TransactionNotification > vQueueNotifications;
|
||||||
|
|
||||||
// Private implementation
|
// Private implementation
|
||||||
class TransactionTablePriv
|
class TransactionTablePriv
|
||||||
{
|
{
|
||||||
@@ -674,33 +701,6 @@ void TransactionTableModel::updateDisplayUnit()
|
|||||||
Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount));
|
Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount));
|
||||||
}
|
}
|
||||||
|
|
||||||
// queue notifications to show a non freezing progress dialog e.g. for rescan
|
|
||||||
struct TransactionNotification
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TransactionNotification() {}
|
|
||||||
TransactionNotification(uint256 _hash, ChangeType _status, bool _showTransaction):
|
|
||||||
hash(_hash), status(_status), showTransaction(_showTransaction) {}
|
|
||||||
|
|
||||||
void invoke(QObject *ttm)
|
|
||||||
{
|
|
||||||
QString strHash = QString::fromStdString(hash.GetHex());
|
|
||||||
qDebug() << "NotifyTransactionChanged: " + strHash + " status= " + QString::number(status);
|
|
||||||
bool invoked = QMetaObject::invokeMethod(ttm, "updateTransaction", Qt::QueuedConnection,
|
|
||||||
Q_ARG(QString, strHash),
|
|
||||||
Q_ARG(int, status),
|
|
||||||
Q_ARG(bool, showTransaction));
|
|
||||||
assert(invoked);
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
uint256 hash;
|
|
||||||
ChangeType status;
|
|
||||||
bool showTransaction;
|
|
||||||
};
|
|
||||||
|
|
||||||
static bool fQueueNotifications = false;
|
|
||||||
static std::vector< TransactionNotification > vQueueNotifications;
|
|
||||||
|
|
||||||
static void NotifyTransactionChanged(TransactionTableModel *ttm, const uint256 &hash, ChangeType status)
|
static void NotifyTransactionChanged(TransactionTableModel *ttm, const uint256 &hash, ChangeType status)
|
||||||
{
|
{
|
||||||
// Find transaction in wallet
|
// Find transaction in wallet
|
||||||
|
|||||||
Reference in New Issue
Block a user