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
This commit is contained in:
Jacopo De Simoi 2012-10-04 12:12:48 +02:00
parent 1ed4f894cc
commit 7a1f75af9b

View File

@ -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);