diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-11-24 15:01:53 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-11-30 12:21:58 +0000 |
commit | ca14600965479dd3d255b734a0fe54bb2ba7892d (patch) | |
tree | c9f34eb89d7c257a21ffb66b56dd1cbd0811cf3f /src/widgets/dialogs | |
parent | 197da3d220fb267d127288e109e691d832ce290b (diff) |
Use natural comparison also for the file types
If we want to sort according to file types, we're also
sorting user visible strings. For that we can also use the
natural comparison collator, as file types should be case
insensitive, and won't contain numbers. And even if they do
a natual sorting will make it easier for the end user to find
what they are looking for.
Change-Id: Ie1d7d0af041a08be0f0d1a4eeb2eae9be885ffc7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 1b9a1129b2..cfc6b9c4cc 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1024,7 +1024,7 @@ public: } case 2: { - int compare = QString::localeAwareCompare(l->type(), r->type()); + int compare = naturalCompare.compare(l->type(), r->type()); if (compare == 0) return naturalCompare.compare(l->fileName, r->fileName) < 0; |