]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Properly sort int roles
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 22 May 2018 11:34:14 +0000 (13:34 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Tue, 22 May 2018 11:34:14 +0000 (13:34 +0200)
Use integer comparison for word count, line count, track, and release year.

BUG: 394355

Differential Revision: https://phabricator.kde.org/D12948

src/kitemviews/kfileitemmodel.cpp

index 844954d6a3e8883239190213f7b4c16f60cf8d81..2a9e2ea41fd02c256f71d27ca4ee41db23c4919a 100644 (file)
@@ -1848,7 +1848,11 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const
 
     case RatingRole:
     case WidthRole:
-    case HeightRole: {
+    case HeightRole:
+    case WordCountRole:
+    case LineCountRole:
+    case TrackRole:
+    case ReleaseYearRole: {
         result = a->values.value(roleForType(m_sortRole)).toInt() - b->values.value(roleForType(m_sortRole)).toInt();
         break;
     }