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
This commit is contained in:
Kai Uwe Broulik 2018-05-22 13:34:14 +02:00
parent 099da00df6
commit 05d5792ac3

View 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;
}