From e8e2be90834b6526006f4961d62d511079d24d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= Date: Mon, 22 May 2017 10:08:16 +0200 Subject: [PATCH] We should not forget the launchers that are not currently shown Summary: The pinned launchers that are assigned to other activities will have a -1 as the order. We should not forget them when saving to the configuration file. Reviewers: hein, mart Reviewed By: hein Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D5933 --- libtaskmanager/tasksmodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libtaskmanager/tasksmodel.cpp b/libtaskmanager/tasksmodel.cpp index ed64b6878..3d791ae5b 100644 --- a/libtaskmanager/tasksmodel.cpp +++ b/libtaskmanager/tasksmodel.cpp @@ -1588,6 +1588,7 @@ void TasksModel::syncLaunchers() } QMap sortedShownLaunchers; + QStringList sortedHiddenLaunchers; foreach(const QString &launcherUrlStr, launcherList()) { int row = -1; @@ -1607,6 +1608,8 @@ void TasksModel::syncLaunchers() if (row != -1) { sortedShownLaunchers.insert(row, launcherUrlStr); + } else { + sortedHiddenLaunchers << launcherUrlStr; } } @@ -1632,7 +1635,7 @@ void TasksModel::syncLaunchers() } } - setLauncherList(sortedShownLaunchers.values()); + setLauncherList(sortedShownLaunchers.values() + sortedHiddenLaunchers); d->launcherSortingDirty = false; }