mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
qt: Assert QMetaObject::invokeMethod result
This commit is contained in:
@@ -687,10 +687,11 @@ public:
|
||||
{
|
||||
QString strHash = QString::fromStdString(hash.GetHex());
|
||||
qDebug() << "NotifyTransactionChanged: " + strHash + " status= " + QString::number(status);
|
||||
QMetaObject::invokeMethod(ttm, "updateTransaction", Qt::QueuedConnection,
|
||||
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;
|
||||
@@ -725,12 +726,16 @@ static void ShowProgress(TransactionTableModel *ttm, const std::string &title, i
|
||||
if (nProgress == 100)
|
||||
{
|
||||
fQueueNotifications = false;
|
||||
if (vQueueNotifications.size() > 10) // prevent balloon spam, show maximum 10 balloons
|
||||
QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
|
||||
if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons
|
||||
bool invoked = QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
|
||||
assert(invoked);
|
||||
}
|
||||
for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
|
||||
{
|
||||
if (vQueueNotifications.size() - i <= 10)
|
||||
QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
|
||||
if (vQueueNotifications.size() - i <= 10) {
|
||||
bool invoked = QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
|
||||
assert(invoked);
|
||||
}
|
||||
|
||||
vQueueNotifications[i].invoke(ttm);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user