mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-09 21:57:20 +01:00
qt: Refactor to remove unnecessary block in DispatchNotifications
Review with --ignore-all-space
This commit is contained in:
parent
57785fb7f6
commit
cafef080a2
1 changed files with 9 additions and 11 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue