Enable natural sorting on QCollator in KDirSortFilterProxyModel

Review Request #128574 - Created Aug. 2, 2016 and submitted

Information
Mathis Beer
kio
343452
Reviewers
kdeframeworks
dfaure, shaforo, sitter

KDirSortFilterProxyModel is advertised in the header as performing a "natural sort", ie. "7 8 9 10 11", instead of a lexical "10 11 7 8 9".
However, as far as I can tell this was never true from the start, since the collator responsible for the actual sorting did not have the requisite numeric mode enabled, and this setting has always been off by default as far back as I can find docs for it (Qt 5.2).

(Dolphin, which offers "natural sort", did not run into this issue because it does not actually use KDirSortFilterProxyModel.)

Create a folder with three images, "File 1.png", "File 10.png", "File 2.png".
View the folder in Gwenview with sort order set to "Name". The sort order is "File 1.png, File 10.png, File 2.png".
Apply patch.
View the folder in Gwenview with sort order set to "Name". The sort order is "File 1.png, File 2.png, File 10.png".

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Mathis Beer
Mathis Beer
Konstantinos Smanis
Aleix Pol Gonzalez
Mathis Beer
Mathis Beer
Elvis Angelaccio
Mathis Beer
Elvis Angelaccio
Mathis Beer
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit f29bbfb1c17dbfa92b27fa6d5a1c86b06a71a6b8 by Elvis Angelaccio on behalf of Mathis Beer to branch master.
Loading...