From e817c3246cf512a89a3de003763273f29d9cfe8c Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Mon, 22 Jan 2024 18:33:09 +0100 Subject: Slightly refactor count resorting The bug fix 8f043b2958477d3fe2ef094b7e42f792f4cf0b02 introduced a secondary code path to trigger a resort of items. However, the previous way to trigger it only required a small bug fix to work and gives us a couple of optimisations for free. This commit removes the secondary code path and fixes the primary one. CCBUG: 473999 --- src/kitemviews/kfileitemmodelrolesupdater.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/kitemviews/kfileitemmodelrolesupdater.cpp') diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index 9dfa674bc..2a3a8eeb3 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -1354,10 +1354,6 @@ void KFileItemModelRolesUpdater::startDirectorySizeCounting(const KFileItem &ite disconnect(m_model, &KFileItemModel::itemsChanged, this, &KFileItemModelRolesUpdater::slotItemsChanged); m_model->setData(index, newData); connect(m_model, &KFileItemModel::itemsChanged, this, &KFileItemModelRolesUpdater::slotItemsChanged); - - if (newData.contains("count") && m_model->sortRole() == "size") { - m_model->scheduleResortAllItems(); - } } }); return; -- cgit v1.3.1