From 5bac69e51657dd3254d3aaf3cd6a543cd3079401 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 24 Jul 2017 14:44:55 +0200 Subject: [PATCH 1/2] [LauncherTasksModel] Emit dataChanged for LauncherUrlWithoutIcon on sycoca change This is done in XWindowTasksModel and WaylandTasksModel but was forgotten in LauncherTasksModel. Differential Revision: https://phabricator.kde.org/D6869 --- libtaskmanager/launchertasksmodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libtaskmanager/launchertasksmodel.cpp b/libtaskmanager/launchertasksmodel.cpp index 0448ec6b9..d20379659 100644 --- a/libtaskmanager/launchertasksmodel.cpp +++ b/libtaskmanager/launchertasksmodel.cpp @@ -75,7 +75,8 @@ void LauncherTasksModel::Private::init() q->dataChanged(q->index(0, 0), q->index(launchers.count() - 1, 0), QVector{Qt::DisplayRole, Qt::DecorationRole, AbstractTasksModel::AppId, AbstractTasksModel::AppName, - AbstractTasksModel::GenericName, AbstractTasksModel::LauncherUrl}); + AbstractTasksModel::GenericName, AbstractTasksModel::LauncherUrl, + AbstractTasksModel::LauncherUrlWithoutIcon}); } ); From cc2f28ece16a8e83703ca0d1a074410f62d1c130 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Mon, 24 Jul 2017 14:45:45 +0200 Subject: [PATCH 2/2] [TasksModel] Use LauncherUrlWithoutIcon in move method It is passed to launcherPosition which then ignores query items anyway. Differential Revision: https://phabricator.kde.org/D6872 --- libtaskmanager/tasksmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libtaskmanager/tasksmodel.cpp b/libtaskmanager/tasksmodel.cpp index 3955235d4..e53663a68 100644 --- a/libtaskmanager/tasksmodel.cpp +++ b/libtaskmanager/tasksmodel.cpp @@ -1353,7 +1353,7 @@ bool TasksModel::move(int row, int newPos) // When using launch-in-place sorting, launcher-backed window tasks act as launchers. } else if ((d->launchInPlace || !d->separateLaunchers) && idx.data(AbstractTasksModel::IsWindow).toBool()) { - const QUrl &launcherUrl = idx.data(AbstractTasksModel::LauncherUrl).toUrl(); + const QUrl &launcherUrl = idx.data(AbstractTasksModel::LauncherUrlWithoutIcon).toUrl(); const int launcherPos = launcherPosition(launcherUrl); if (launcherPos != -1) {