32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
|
From eb9cab2e55ba9b7f9b86577ba12f673c40e07e67 Mon Sep 17 00:00:00 2001
|
||
|
From: Wolfgang Bauer <wbauer@tmo.at>
|
||
|
Date: Fri, 14 Apr 2017 12:43:10 +0200
|
||
|
Subject: Enable numericMode for sorting document list in filetree
|
||
|
|
||
|
Turns on "natural" sorting for the document list in the filetree addon,
|
||
|
so that e.g. 10 comes after 9, not before.
|
||
|
That's how the KDE4 version behaved too.
|
||
|
|
||
|
BUG: 375676
|
||
|
FIXED-IN: 17.04.1
|
||
|
Differential Revision: https://phabricator.kde.org/D5448
|
||
|
---
|
||
|
addons/filetree/katefiletreeproxymodel.cpp | 1 +
|
||
|
1 file changed, 1 insertion(+)
|
||
|
|
||
|
diff --git a/addons/filetree/katefiletreeproxymodel.cpp b/addons/filetree/katefiletreeproxymodel.cpp
|
||
|
index 13a4d0e..206dfb8 100644
|
||
|
--- a/addons/filetree/katefiletreeproxymodel.cpp
|
||
|
+++ b/addons/filetree/katefiletreeproxymodel.cpp
|
||
|
@@ -49,6 +49,7 @@ bool KateFileTreeProxyModel::lessThan(const QModelIndex &left, const QModelIndex
|
||
|
|
||
|
QCollator collate;
|
||
|
collate.setCaseSensitivity(Qt::CaseInsensitive);
|
||
|
+ collate.setNumericMode(true);
|
||
|
|
||
|
switch (sortRole()) {
|
||
|
case Qt::DisplayRole: {
|
||
|
--
|
||
|
cgit v0.11.2
|
||
|
|