kate/enable-numericMode-in-filetree.patch
Luca Beltrame fbc2bdba29 Accepting request 488970 from home:wolfi323:branches:KDE:Applications
- Add enable-numericMode-in-filetree.patch to sort the file names in the "Documents" pane naturally, i.e. 10 comes after 9 instead of before (kde#375676)

OBS-URL: https://build.opensuse.org/request/show/488970
OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kate?expand=0&rev=71
2017-04-17 17:59:23 +00:00

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