mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-10 09:06:15 +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 (!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
|
if (vQueueNotifications.size() - i <= 10) {
|
||||||
bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
|
bool invoked = QMetaObject::invokeMethod(parent, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
|
||||||
assert(invoked);
|
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[i].invoke(parent);
|
||||||
}
|
|
||||||
vQueueNotifications.clear();
|
|
||||||
}
|
}
|
||||||
|
vQueueNotifications.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionTableModel::subscribeToCoreSignals()
|
void TransactionTableModel::subscribeToCoreSignals()
|
||||||
|
|
Loading…
Add table
Reference in a new issue