From 7a1f75af9b82291fb04106bbc7361cc0780d0043 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Thu, 4 Oct 2012 12:12:48 +0200 Subject: [PATCH] Remove noop check in setSortRole The noop check m_sortRole == role has to be removed because the hash table m_roleIds can change between two calls to setSortRole (as it actually happens when resync the hash table). Possibly one could perform a more clever check (i.e. adding some m_invalidated flag which would override the check), but I am not sure it is really worth it. This fixes sorting issues in the Plasma Device Notifier CCMAIL:notmart@gmail.com --- declarativeimports/core/datamodel.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/declarativeimports/core/datamodel.cpp b/declarativeimports/core/datamodel.cpp index c1ed999fc..30b655309 100644 --- a/declarativeimports/core/datamodel.cpp +++ b/declarativeimports/core/datamodel.cpp @@ -111,9 +111,6 @@ QString SortFilterModel::filterRole() const void SortFilterModel::setSortRole(const QString &role) { - if (m_sortRole == role) { - return; - } m_sortRole = role; if (role.isEmpty()) { sort(-1, Qt::AscendingOrder);