diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-06 17:16:01 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-07-08 21:30:25 +0100 |
commit | 64fee489448c62319e77941c30152084695b5a5d (patch) | |
tree | c1bcdf98960b532e5762f58cf7e95e0e00db3241 /src/qt/transactiontablemodel.cpp | |
parent | f27bd96b5fdc2921d93c44bbf422bff0e979c4de (diff) |
qt: Assert QMetaObject::invokeMethod result
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 6fe35b13cf..1064c60dfd 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -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); } |