From dda4d42e891a386c747fbe0e5698ca019921d3a1 Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Wed, 15 Feb 2017 00:43:32 +0900 Subject: [PATCH] Fix manually reordering launchers. Summary: syncLaunchers() is called after drag operations end to write the order of launchers in the all-capping TasksModel to the LauncherTaskModel source model. The per-activity launcher pinning work recently broke this by changing the model that's looped over. Reviewers: #plasma, ivan, davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4608 --- libtaskmanager/tasksmodel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libtaskmanager/tasksmodel.cpp b/libtaskmanager/tasksmodel.cpp index d045320c8..a78d8f929 100644 --- a/libtaskmanager/tasksmodel.cpp +++ b/libtaskmanager/tasksmodel.cpp @@ -1511,9 +1511,8 @@ void TasksModel::syncLaunchers() std::tie(launcherUrl, activities) = deserializeLauncher(launcherUrlStr); - for (int i = 0; i < d->launcherTasksModel->rowCount(); ++i) { - const QUrl &rowLauncherUrl = - d->launcherTasksModel->index(i, 0).data(AbstractTasksModel::LauncherUrlWithoutIcon).toUrl(); + for (int i = 0; i < rowCount(); ++i) { + const QUrl &rowLauncherUrl = index(i, 0).data(AbstractTasksModel::LauncherUrlWithoutIcon).toUrl(); if (launcherUrlsMatch(launcherUrl, rowLauncherUrl, IgnoreQueryItems)) { row = i; @@ -1547,7 +1546,6 @@ void TasksModel::syncLaunchers() d->sortedPreFilterRows.replace(sortMapIndices.at(i), preFilterRows.at(i)); } } - setLauncherList(sortedShownLaunchers.values()); d->launcherSortingDirty = false; }