aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Haumann <[email protected]>2018-02-04 19:54:04 +0100
committerDominik Haumann <[email protected]>2018-02-04 19:54:28 +0100
commit5e7e72e7ba119bd6fb78888033a733ea21c2b4ec (patch)
treedebcc375d74f7b41a9a43e3a35a5162801cd1499
parent7c9c1a4b3e71f8f163b46eba11d0afafa4492ca7 (diff)
Fixes sorting of items within Kate editor's session applet
Summary: I have session names of the form: "Project :: Some Project Name", which were not being sorted correctly. This patch allows the listing to be sorted properly. Reviewers: #kate Subscribers: dhaumann, omarplummer Tags: #kate Differential Revision: https://phabricator.kde.org/D10208
-rw-r--r--addons/sessionapplet/engine/katesessionsmodel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/sessionapplet/engine/katesessionsmodel.cpp b/addons/sessionapplet/engine/katesessionsmodel.cpp
index bdd0861..a4fe43a 100644
--- a/addons/sessionapplet/engine/katesessionsmodel.cpp
+++ b/addons/sessionapplet/engine/katesessionsmodel.cpp
@@ -37,12 +37,11 @@
#include <QStandardPaths>
#include <QDebug>
-bool katesessions_compare_sessions(const QString &s1, const QString &s2) {
- //return KStringHandler::naturalCompare(s1,s2)==-1;
- return s1.compare(s2)==-1;
+bool katesessions_compare_sessions(const QString &s1, const QString &s2)
+{
+ return QString::localeAwareCompare(s1, s2) == -1;
}
-
KateSessionsModel::KateSessionsModel(QObject *parent)
: QStandardItemModel(parent) /*, m_config(0)*/
{