Verified Commit d83674e5 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

applet: Block all role changes while in delayModelUpdates mode

Practically all roles are accounted for when comparing connections in
downstream sort-filter proxy model. Let's block all roles from
propagating changes while scan delay is requested to avoid surprises.

Partially helps, but not fully fixes:

CCBUG: 389052
(cherry picked from commit 6a6cbe10)
parent 1d6dbfd1
......@@ -615,9 +615,7 @@ void NetworkModel::removeItem(NetworkModelItem *item)
void NetworkModel::updateItem(NetworkModelItem *item)
const QVector<int> changedRoles = item->changedRoles();
// Check only primary roles which can change item order
if (m_delayModelUpdates && (changedRoles.contains(ConnectionStateRole) || changedRoles.contains(ItemTypeRole) || changedRoles.contains(SignalRole))) {
if (m_delayModelUpdates) {
m_updateQueue.enqueue(QPair<NetworkModel::ModelChangeType, NetworkModelItem *>(NetworkModel::ItemPropertyChanged, item));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment