aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiontablemodel.cpp
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2021-04-29 00:15:57 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2021-04-29 00:18:55 +0100
commitcafef080a2e59c2bcae6baeee3c3c7e187e931ae (patch)
treefe93a0ffca106221a32a1cd9a366011f6401e626 /src/qt/transactiontablemodel.cpp
parent57785fb7f61e51e8a8a459486a594443665ea8c9 (diff)
qt: Refactor to remove unnecessary block in DispatchNotifications
Review with --ignore-all-space
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r--src/qt/transactiontablemodel.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index c0bdb36e3a..0175c88e7f 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -735,22 +735,20 @@ void TransactionTablePriv::DispatchNotifications()
{
if (!m_loaded || m_loading) return;
+ if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons
+ bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
+ assert(invoked);
+ }
+ for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
{
- if (vQueueNotifications.size() > 10) { // prevent balloon spam, show maximum 10 balloons
- bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
+ if (vQueueNotifications.size() - i <= 10) {
+ bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
assert(invoked);
}
- for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
- {
- if (vQueueNotifications.size() - i <= 10) {
- bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
- assert(invoked);
- }
- vQueueNotifications[i].invoke(parent);
- }
- vQueueNotifications.clear();
+ vQueueNotifications[i].invoke(parent);
}
+ vQueueNotifications.clear();
}
void TransactionTableModel::subscribeToCoreSignals()