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:
parent
1ed4f894cc
commit
7a1f75af9b
@ -111,9 +111,6 @@ QString SortFilterModel::filterRole() const
|
|||||||
|
|
||||||
void SortFilterModel::setSortRole(const QString &role)
|
void SortFilterModel::setSortRole(const QString &role)
|
||||||
{
|
{
|
||||||
if (m_sortRole == role) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_sortRole = role;
|
m_sortRole = role;
|
||||||
if (role.isEmpty()) {
|
if (role.isEmpty()) {
|
||||||
sort(-1, Qt::AscendingOrder);
|
sort(-1, Qt::AscendingOrder);
|
||||||
|
Loading…
Reference in New Issue
Block a user