From: Kai Uwe Broulik Date: Tue, 22 May 2018 11:34:14 +0000 (+0200) Subject: Properly sort int roles X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/05d5792ac303eac90aab28f617e6e72727277002 Properly sort int roles Use integer comparison for word count, line count, track, and release year. BUG: 394355 Differential Revision: https://phabricator.kde.org/D12948 --- diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 844954d6a..2a9e2ea41 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -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; }