summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Hein <[email protected]>2018-06-02 02:00:28 +0900
committerEike Hein <[email protected]>2018-06-02 03:58:48 +0900
commiteda4d2645fa8113104721c6237e5d11724a35038 (patch)
treed028bdeef895f5afcccb865880c7b732728e7416
parent2390a4d4c199e4123179af607a6b37ffd08cefde (diff)
Fix Recent Applications sorting in Kicker and Dashboard.
Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D13273
-rw-r--r--applets/kicker/plugin/recentusagemodel.cpp5
-rw-r--r--applets/kicker/plugin/recentusagemodel.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/applets/kicker/plugin/recentusagemodel.cpp b/applets/kicker/plugin/recentusagemodel.cpp
index 8f1711c..bf3e4a6 100644
--- a/applets/kicker/plugin/recentusagemodel.cpp
+++ b/applets/kicker/plugin/recentusagemodel.cpp
@@ -97,6 +97,11 @@ bool InvalidAppsFilterProxy::filterAcceptsRow(int source_row, const QModelIndex
return true;
}
+bool InvalidAppsFilterProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const
+{
+ return (left.row() < right.row());
+}
+
bool GroupSortProxy::lessThan(const QModelIndex &left, const QModelIndex &right) const
{
const QString &lResource = sourceModel()->data(left, ResultModel::ResourceRole).toString();
diff --git a/applets/kicker/plugin/recentusagemodel.h b/applets/kicker/plugin/recentusagemodel.h
index 89b7215..49107e2 100644
--- a/applets/kicker/plugin/recentusagemodel.h
+++ b/applets/kicker/plugin/recentusagemodel.h
@@ -47,6 +47,7 @@ class InvalidAppsFilterProxy : public QSortFilterProxyModel
protected:
bool filterAcceptsRow(int source_row, const QModelIndex & source_parent) const Q_DECL_OVERRIDE;
+ bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
private Q_SLOTS:
void connectNewFavoritesModel();