From 1e985590b5121aa2dca2b775ccbcc5c06d7e62b4 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 29 Nov 2020 18:12:13 +0200 Subject: [PATCH] upgrade debug timers flag to Abilities --- .../ui/abilities/privates/ParabolicEffectPrivate.qml | 3 ++- .../package/contents/ui/applet/communicator/Engine.qml | 2 +- .../package/contents/ui/layouts/LayoutsContainer.qml | 2 +- containment/package/contents/ui/main.qml | 6 +++--- plasmoid/package/contents/ui/main.qml | 9 +++++---- plasmoid/package/contents/ui/task/TaskItem.qml | 6 +++--- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml index 32bb54a16..3f8134472 100644 --- a/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml +++ b/containment/package/contents/ui/abilities/privates/ParabolicEffectPrivate.qml @@ -31,6 +31,7 @@ ContainerAbility.ParabolicEffect { property Item animations: null property Item applets: null + property Item debug: null property QtObject view: null readonly property bool horizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal @@ -146,7 +147,7 @@ ContainerAbility.ParabolicEffect { parabolic.sglClearZoom(); - if (root.debugModeTimers) { + if (debug.timersEnabled) { console.log("containment timer: RestoreZoomTimer called..."); } } diff --git a/containment/package/contents/ui/applet/communicator/Engine.qml b/containment/package/contents/ui/applet/communicator/Engine.qml index 25daf3628..52ef32ce8 100644 --- a/containment/package/contents/ui/applet/communicator/Engine.qml +++ b/containment/package/contents/ui/applet/communicator/Engine.qml @@ -118,7 +118,7 @@ Item{ AppletIdentifier.reconsiderAppletIconItem(); mainCommunicator.inStartup = false; - if (root.debugModeTimers) { + if (appletItem.debug.timersEnabled) { console.log("containment timer: appletItem fakeInitTimer called..."); } } diff --git a/containment/package/contents/ui/layouts/LayoutsContainer.qml b/containment/package/contents/ui/layouts/LayoutsContainer.qml index 3552bacaa..1db0be2aa 100644 --- a/containment/package/contents/ui/layouts/LayoutsContainer.qml +++ b/containment/package/contents/ui/layouts/LayoutsContainer.qml @@ -524,7 +524,7 @@ Item{ visibilityManager.updateMaskArea(); - if (root.debugModeTimers) { + if (debug.timersEnabled) { console.log("LayoutsContainer timer: delayUpdateMaskArea called..."); } } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index e56910e45..ed918102e 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -66,7 +66,6 @@ Item { property bool debugModeLayouter: Qt.application.arguments.indexOf("--layouter")>=0 property bool debugModeLocalGeometry: Qt.application.arguments.indexOf("--localgeometry")>=0 property bool debugModeSpacers: Qt.application.arguments.indexOf("--spacers")>=0 - property bool debugModeTimers: Qt.application.arguments.indexOf("--timers")>=0 readonly property int version: LatteCore.Environment.makeVersion(0,9,75) readonly property bool kirigamiLibraryIsFound: LatteCore.Environment.frameworksVersion >= LatteCore.Environment.makeVersion(5,69,0) @@ -1215,7 +1214,7 @@ Item { titleTooltipCheckerToNotShowTimer.start(); } - if (root.debugModeTimers) { + if (debug.timersEnabled) { console.log("containment timer: showTitleTooltipTimer called..."); } } @@ -1229,7 +1228,7 @@ Item { titleTooltipDialog.visible = false; } - if (root.debugModeTimers) { + if (debug.timersEnabled) { console.log("containment timer: hideTitleTooltipTimer called..."); } @@ -1508,6 +1507,7 @@ Item { id: _parabolic animations: _animations applets: layoutsContainer.applets + debug: _debug view: latteView } diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 3a5bc9ed9..a5c256ca9 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -125,6 +125,7 @@ Item { property Item tasksExtendedManager: _tasksExtendedManager readonly property alias animations: _animations + readonly property alias debug: _debug readonly property alias indexer: _indexer readonly property alias launchers: _launchers readonly property alias metrics: _metrics @@ -617,7 +618,7 @@ Item { onTriggered: { tasksModel.requestClose(delayWindowRemovalTimer.modelIndex) - if (latteView && latteView.debugModeTimers) { + if (debug.timersEnabled) { console.log("plasmoid timer: delayWindowRemovalTimer called..."); } } @@ -631,7 +632,7 @@ Item { root.publishTasksGeometries(); activityInfo.previousActivity = activityInfo.currentActivity; - if (latteView && latteView.debugModeTimers) { + if (debug.timersEnabled) { console.log("plasmoid timer: activityChangeDelayer called..."); } } @@ -998,7 +999,7 @@ Item { tasksModel.anyTaskDemandsAttentionInValidTime = false; destroy(); - if (latteView && latteView.debugModeTimers) { + if (debug.timersEnabled) { console.log("plasmoid timer: attentionTimer called..."); } } @@ -1442,7 +1443,7 @@ Item { onTriggered: { root.publishTasksGeometries(); - if (latteView && latteView.debugModeTimers) { + if (debug.timersEnabled) { console.log("plasmoid timer: iconGeometryTimer called..."); } } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 99d3f4bd6..9c3cd2db9 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -559,7 +559,7 @@ MouseArea{ onTriggered: { slotPublishGeometries(); - if (latteView && latteView.debugModeTimers) { + if (taskItem.debug.timersEnabled) { console.log("plasmoid timer: publishGeometryTimer called..."); } } @@ -1593,7 +1593,7 @@ MouseArea{ taskItem.isDragged = true; } - if (latteView && latteView.debugModeTimers) { + if (taskItem.debug.timersEnabled) { console.log("plasmoid timer: resistanerTimer called..."); } } @@ -1612,7 +1612,7 @@ MouseArea{ taskItem.lastValidIndex = taskItem.itemIndex; } - if (latteView && latteView.debugModeTimers) { + if (taskItem.debug.timersEnabled) { console.log("plasmoid timer: lastValidTimer called..."); } }