Bug 394355 - Incorrect sort by track number
Summary: Incorrect sort by track number
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 17.12.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
Depends on:
Reported: 2018-05-17 07:27 UTC by Stuart Trotter
Modified: 2018-05-22 12:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

Screenshot of current sorting (211.10 KB, image/png)
2018-05-17 07:27 UTC, Stuart Trotter

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Trotter 2018-05-17 07:27:53 UTC
Created attachment 112698 [details]
Screenshot of current sorting

Track number sorted so that all the numbers starting with a 1 are sorted first and then all or the numbers with a 2 leading to sorting that goes 1, 10, 11... 2, 20, 21...

It would be better to have sorting that sorts 1, 2, 3...
Comment 1 Kai Uwe Broulik 2018-05-17 08:48:52 UTC
Can you check whether you have natural sorting enabled in Dolphin General settings? Also, does this happen also with file names? ie. "Foo 1.txt", "Foo 10.txt", "Foo 2.txt"?
Comment 2 Stuart Trotter 2018-05-17 14:02:57 UTC
Natural sorting is enabled and I have checked with file names and they are sorted correctly
Comment 3 Kai Uwe Broulik 2018-05-17 15:09:07 UTC
Confirmed, patch https://phabricator.kde.org/D12948
Comment 4 Kai Uwe Broulik 2018-05-22 11:34:56 UTC
Git commit 05d5792ac303eac90aab28f617e6e72727277002 by Kai Uwe Broulik.
Committed on 22/05/2018 at 11:34.
Pushed by broulik into branch 'master'.

Properly sort int roles

Use integer comparison for word count, line count, track, and release year.

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

M  +5    -1    src/kitemviews/kfileitemmodel.cpp