add option to debug timers

--this is especially useful in order to be sure that
there are timers that create unending loops
pull/2/head
Michail Vourlakos 7 years ago
parent 51f879d2a2
commit 88108ac524

@ -81,10 +81,11 @@ int main(int argc, char **argv)
parser.addOptions({
{{"r", "replace"}, i18nc("command line", "Replace the current dock instance.")}
, {{"d", "debug"}, i18nc("command line", "Show the debugging messages on stdout.")}
, {"mask", i18nc("command line" , "Show messages of debugging for the mask (Only useful to devs).")}
, {"graphics", i18nc("command line", "Draw boxes around of the applets.")}
, {"with-window", i18nc("command line", "Open a window with much debug information.")}
, {"import", i18nc("command line", "Import configuration."), i18nc("command line: import", "file_name")}
, {"mask", i18nc("command line" , "Show messages of debugging for the mask (Only useful to devs).")}
, {"timers", i18nc("command line", "Show messages for debugging the timers (Only useful to devs).")}
});
parser.process(app);

@ -131,7 +131,13 @@ Item {
Timer {
id: fakeInitTimer
interval: 4000
onTriggered: AppletIndetifier.reconsiderAppletIconItem();
onTriggered: {
AppletIndetifier.reconsiderAppletIconItem();
if (root.debugModeTimers) {
console.log("containment timer: appletItem fakeInitTimer called...");
}
}
}
//set up the fake containers and properties for when a fakeIconItem must be presented to the user

@ -49,6 +49,7 @@ DragDrop.DropArea {
////BEGIN properties
property bool debugMode: Qt.application.arguments.indexOf("--graphics")>=0
property bool debugModeWindow: Qt.application.arguments.indexOf("--with-window")>=0
property bool debugModeTimers: Qt.application.arguments.indexOf("--timers")>=0
property bool globalDirectRender: false //it is used as a globalDirectRender for all elements in the dock
property bool directRenderTimerIsRunning: enableDirectRenderTimer.running
property int directRenderAnimationTime: 0
@ -1268,7 +1269,13 @@ DragDrop.DropArea {
Timer {
id: showTitleTooltipTimer
interval: 100
onTriggered: titleTooltipDialog.update();
onTriggered: {
titleTooltipDialog.update();
if (root.debugModeTimers) {
console.log("containment timer: showTitleTooltipTimer called...");
}
}
}
Timer {
@ -1278,6 +1285,11 @@ DragDrop.DropArea {
if (!titleTooltipDialog.activeItemHovered) {
titleTooltipDialog.visible = false;
}
if (root.debugModeTimers) {
console.log("containment timer: hideTitleTooltipTimer called...");
}
}
}
/////END: Title Tooltip///////////
@ -1431,6 +1443,10 @@ DragDrop.DropArea {
root.globalDirectRender = false;
root.clearZoom();
}
if (root.debugModeTimers) {
console.log("containment timer: checkRestoreZoom called...");
}
}
}
@ -1446,6 +1462,10 @@ DragDrop.DropArea {
if (dock.visibility.containsMouse)
root.globalDirectRender = true;
if (root.debugModeTimers) {
console.log("containment timer: enableDirectRenderTimer called...");
}
}
}
@ -1465,6 +1485,10 @@ DragDrop.DropArea {
}
visibilityManager.updateMaskArea();
if (root.debugModeTimers) {
console.log("containment timer: delayUpdateMaskArea called...");
}
}
}

@ -424,7 +424,13 @@ Item {
Timer {
id: showPreviewWinTimer
interval: 50
onTriggered: windowsPreviewDlg.visible = true;
onTriggered: {
windowsPreviewDlg.visible = true;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: showPreviewTimer called...");
}
}
}
//! Timer to fix a crash that when going to Alternative Session through Context Menu,
@ -444,6 +450,10 @@ Item {
}
latteDock.universalLayoutManager.switchToLayout(toLayout);
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: switchLayoutTimer called...");
}
}
}
@ -458,6 +468,10 @@ Item {
onTriggered: {
tasksModel.requestClose(delayWindowRemovalTimer.modelIndex)
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: delayWindowRemovalTimer called...");
}
}
}
@ -467,6 +481,10 @@ Item {
onTriggered: {
root.inActivityChange = false;
activityInfo.previousActivity = activityInfo.currentActivity;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: activityChangeDelayer called...");
}
}
}
@ -752,6 +770,10 @@ Item {
onTriggered: {
plasmoid.status = PlasmaCore.Types.PassiveStatus;
destroy();
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: attentionTimer called...");
}
}
Component.onCompleted: {
start();
@ -787,6 +809,10 @@ Item {
}
interval = normalInterval;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: checkListHovered called...");
}
}
function startNormal(){
@ -818,6 +844,10 @@ Item {
restart();
else
icList.directRender = true;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: enableDirectRenderTimer called...");
}
}
}
@ -1099,6 +1129,10 @@ Item {
onTriggered: {
// console.debug("Found children: "+icList.contentItem.children.length);
TaskTools.publishIconGeometries(icList.contentItem.children);
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: iconGeometryTimer called...");
}
}
}

@ -502,6 +502,11 @@ MouseArea{
onTriggered: {
// mainItemContainer.hoverEnabled = true;
slotPublishGeometries();
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: taskInitComponentTimer called...");
}
timer.destroy();
}
@ -1326,6 +1331,11 @@ MouseArea{
if (!mainItemContainer.inBlockingAnimation){
mainItemContainer.isDragged = true;
}
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: resistanerTimer called...");
}
resistanerTimer.destroy();
}
@ -1371,6 +1381,10 @@ MouseArea{
else
showWindowAnimation.execute();
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: timerWindow called...");
}
timerWindow.destroy();
}
@ -1389,6 +1403,10 @@ MouseArea{
onTriggered: {
if (mainItemContainer.itemIndex >= 0)
mainItemContainer.lastValidIndex = mainItemContainer.itemIndex;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: lastValidTimer called...");
}
}
}
@ -1398,7 +1416,13 @@ MouseArea{
Timer {
id: wheelActionDelayer
interval: 200
onTriggered: mainItemContainer.inWheelAction = false;
onTriggered: {
mainItemContainer.inWheelAction = false;
if (latteDock && latteDock.debugModeTimers) {
console.log("plasmoid timer: wheelActionDelayer called...");
}
}
}
///Item's Removal Animation

Loading…
Cancel
Save