on xenial help sign in
Remove dismiss timer in Launcher Fixes: #1368778
d6a86d2Andrea Cimitan
qml/Launcher/Launcher.qml+7−4
@@ -23,6 +23,7 @@ import Unity.Launcher 0.1
23Item {
23Item {
24 id: root
24 id: root
25
25
26+ property bool autohideEnabled: false
26 property bool available: true // can be used to disable all interactions
27 property bool available: true // can be used to disable all interactions
27 property alias inverted: panel.inverted
28 property alias inverted: panel.inverted
28
29
@@ -89,10 +90,12 @@ Item {
89 objectName: "dismissTimer"
90 objectName: "dismissTimer"
90 interval: 5000
91 interval: 5000
91 onTriggered: {
92 onTriggered: {
93+ if (root.autohideEnabled) {
92− if (!panel.preventHiding) {
94+ if (!panel.preventHiding) {
93− root.state = ""
95+ root.state = ""
94− } else {
96+ } else {
95− dismissTimer.restart()
97+ dismissTimer.restart()
98+ }
96 }
99 }
97 }
100 }
98 }
101 }
tests/qmltests/Launcher/tst_Launcher.qml−5
@@ -118,11 +118,6 @@ Item {
118
118
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−
122− // Tests can be run in a reaaaaally slow environment or machine. Thus ensure
123− // the dismissTimer doesn't time out inadvertently.
124− var dismissTimer = findInvisibleChild(launcher, "dismissTimer");
125− dismissTimer.interval = 60 * 60 * 1000; // one hour
126 }
121 }
127
122
128 function dragLauncherIntoView() {
123 function dragLauncherIntoView() {