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
wilder-5.14
Eike Hein 9 years ago
parent b0cb9a4c36
commit dda4d42e89
  1. 6
      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;
}

Loading…
Cancel
Save