on xenial help sign in
comment code
4bef5ebAndrea Cimitan
qml/Launcher/Launcher.qml+24−24
@@ -42,13 +42,13 @@ Item {
42 // emitted when the dash icon in the launcher has been tapped
42 // emitted when the dash icon in the launcher has been tapped
43 signal showDashHome()
43 signal showDashHome()
44
44
45− onStateChanged: {
45+// onStateChanged: {
46− if (state == "") {
46+// if (state == "") {
47− dismissTimer.stop()
47+// dismissTimer.stop()
48− } else {
48+// } else {
49− dismissTimer.restart()
49+// dismissTimer.restart()
50− }
50+// }
51− }
51+// }
52
52
53 function hide() {
53 function hide() {
54 switchToNextState("")
54 switchToNextState("")
@@ -83,18 +83,18 @@ Item {
83 property string mode: "teasing"
83 property string mode: "teasing"
84 }
84 }
85
85
86− Timer {
86+// Timer {
87− id: dismissTimer
87+// id: dismissTimer
88− objectName: "dismissTimer"
88+// objectName: "dismissTimer"
89− interval: 5000
89+// interval: 5000
90− onTriggered: {
90+// onTriggered: {
91− if (!panel.preventHiding) {
91+// if (!panel.preventHiding) {
92− root.state = ""
92+// root.state = ""
93− } else {
93+// } else {
94− dismissTimer.restart()
94+// dismissTimer.restart()
95− }
95+// }
96− }
96+// }
97− }
97+// }
98
98
99 // Because the animation on x is disabled while dragging
99 // Because the animation on x is disabled while dragging
100 // switching state directly in the drag handlers would not animate
100 // switching state directly in the drag handlers would not animate
@@ -210,11 +210,11 @@ Item {
210 root.showDashHome();
210 root.showDashHome();
211 }
211 }
212
212
213− onPreventHidingChanged: {
213+// onPreventHidingChanged: {
214− if (dismissTimer.running) {
214+// if (dismissTimer.running) {
215− dismissTimer.restart();
215+// dismissTimer.restart();
216− }
216+// }
217− }
217+// }
218
218
219 Behavior on x {
219 Behavior on x {
220 enabled: !dragArea.dragging && !launcherDragArea.drag.active && panel.animate;
220 enabled: !dragArea.dragging && !launcherDragArea.drag.active && panel.animate;
tests/qmltests/Launcher/tst_Launcher.qml+4−4
@@ -119,10 +119,10 @@ Item {
119 // Now do check that snapping is in fact enabled
119 // Now do check that snapping is in fact enabled
120 compare(listView.snapMode, ListView.SnapToItem, "Snapping is not enabled");
120 compare(listView.snapMode, ListView.SnapToItem, "Snapping is not enabled");
121
121
122− // Tests can be run in a reaaaaally slow environment or machine. Thus ensure
122+// // Tests can be run in a reaaaaally slow environment or machine. Thus ensure
123− // the dismissTimer doesn't time out inadvertently.
123+// // the dismissTimer doesn't time out inadvertently.
124− var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
124+// var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
125− dismissTimer.interval = 60 * 60 * 1000; // one hour
125+// dismissTimer.interval = 60 * 60 * 1000; // one hour
126 }
126 }
127
127
128 function dragLauncherIntoView() {
128 function dragLauncherIntoView() {