From fbc2bdba29b74a0b6cc0edc418d508b964637dc6b7b45f56521d077588cd2833 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 17 Apr 2017 17:59:23 +0000 Subject: [PATCH] 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 --- enable-numericMode-in-filetree.patch | 31 ++++++++++++++++++++++++++++ kate.changes | 9 +++++++- kate.spec | 5 ++++- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 enable-numericMode-in-filetree.patch diff --git a/enable-numericMode-in-filetree.patch b/enable-numericMode-in-filetree.patch new file mode 100644 index 0000000..9c86724 --- /dev/null +++ b/enable-numericMode-in-filetree.patch @@ -0,0 +1,31 @@ +From eb9cab2e55ba9b7f9b86577ba12f673c40e07e67 Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +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 + diff --git a/kate.changes b/kate.changes index 403eb06..1b19db3 100644 --- a/kate.changes +++ b/kate.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Apr 16 23:15:49 UTC 2017 - wbauer@tmo.at + +- 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) + ------------------------------------------------------------------- Sun Apr 16 10:44:51 CEST 2017 - lbeltrame@kde.org @@ -6,7 +13,7 @@ Sun Apr 16 10:44:51 CEST 2017 - lbeltrame@kde.org * For more details please see: * https://www.kde.org/announcements/announce-applications-17.04.0.php - Changes since 17.03.90: - * Enable numericMode for sorting document list in filetree + * None ------------------------------------------------------------------- Wed Apr 12 20:25:22 CEST 2017 - lbeltrame@kde.org diff --git a/kate.spec b/kate.spec index 5867bef..b631faf 100644 --- a/kate.spec +++ b/kate.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # %bcond_without lang @@ -30,6 +30,8 @@ License: GPL-2.0+ Group: Productivity/Editors/Other Url: http://www.kde.org Source0: %{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch: enable-numericMode-in-filetree.patch BuildRequires: kactivities5-devel BuildRequires: kconfig-devel BuildRequires: kcrash-devel @@ -92,6 +94,7 @@ plugins and data files for Kate and KWrite editors. %prep %setup -q +%patch -p1 %build %cmake_kf5 -d build