From 970dc7d989dff5185b984b4bd6fc4a0bfae7a1cc Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 22 Jun 2015 17:38:10 -0700 Subject: [PATCH] use the dataengine can't use the tasks applet private import from there: plasma-desktop shouldn't be installed on the phone --- .../taskpanel/package/contents/ui/Task.qml | 4 ++-- .../package/contents/ui/TaskSwitcher.qml | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/containments/taskpanel/package/contents/ui/Task.qml b/containments/taskpanel/package/contents/ui/Task.qml index 0de06425..d9dcc970 100644 --- a/containments/taskpanel/package/contents/ui/Task.qml +++ b/containments/taskpanel/package/contents/ui/Task.qml @@ -48,7 +48,7 @@ Item { ScriptAction { script: { if (background.x != 0) { - backend.closeByItemId(model.Id); + window.executeJob("close", model.Id); } } } @@ -85,7 +85,7 @@ Item { onPressed: delegate.z = 10; onClicked: { window.hide(); - backend.activateItem(model.Id, true); + window.executeJob("activate", model.Id); } onReleased: { delegate.z = 0; diff --git a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml index 17758f8f..abec9e74 100644 --- a/containments/taskpanel/package/contents/ui/TaskSwitcher.qml +++ b/containments/taskpanel/package/contents/ui/TaskSwitcher.qml @@ -24,8 +24,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.mobilecomponents 0.2 -import org.kde.plasma.private.taskmanager 0.1 as TaskManager - FullScreenPanel { id: window @@ -58,15 +56,17 @@ FullScreenPanel { scrollAnim.running = true; } - TaskManager.Backend { - id: backend + PlasmaCore.DataSource { + id: tasksSource + engine: "tasks" - highlightWindows: false - - //NoGrouping - groupingStrategy: 0 - //AlphaSorting - sortingStrategy: 2 + connectedSources: "tasks" + } + function executeJob(operationName, id) { + var service = tasksSource.serviceForSource("tasks"); + var operation = service.operationDescription(operationName); + operation.Id = id; + service.startOperationCall(operation); } SequentialAnimation { @@ -140,7 +140,7 @@ FullScreenPanel { } } - model: backend.tasksModel + model: tasksSource.models.tasks header: Item { width: window.width height: window.height