@@ -49,11 +49,9 @@ Item {
4949 launcher: root.launcher
5050 hides: [launcher, panel.indicators]
5151
52− function isReady() {
53− return AccountsService.demoEdgesCompleted.indexOf("left") == -1;
54− }
52+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") == -1
5553
56− Component.onCompleted: if (tutorialLeft.isReady()) show()
54+ Component.onCompleted: if (tutorialLeft.isReady) show()
5755 onFinished: AccountsService.markDemoEdgeCompleted("left")
5856 }
5957
@@ -64,23 +62,21 @@ Item {
6462 panel: root.panel
6563 hides: [launcher, panel.indicators]
6664
67− function isReady() {
68− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
69− AccountsService.demoEdgesCompleted.indexOf("top") == -1;
70− }
65+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
66+ AccountsService.demoEdgesCompleted.indexOf("top") == -1
7167
7268 Timer {
7369 id: tutorialTopTimer
7470 interval: 60000
75− onTriggered: if (tutorialTop.isReady()) tutorialTop.show()
71+ onTriggered: if (tutorialTop.isReady) tutorialTop.show()
7672 }
7773
7874 Connections {
7975 target: AccountsService
80− onDemoEdgesCompletedChanged: if (tutorialTop.isReady()) tutorialTopTimer.start()
76+ onDemoEdgesCompletedChanged: if (tutorialTop.isReady) tutorialTopTimer.start()
8177 }
8278
83− Component.onCompleted: if (tutorialTop.isReady()) tutorialTopTimer.start()
79+ Component.onCompleted: if (tutorialTop.isReady) tutorialTopTimer.start()
8480 onFinished: AccountsService.markDemoEdgeCompleted("top")
8581
8682 Connections {
@@ -100,27 +96,25 @@ Item {
10096 stage: root.stage
10197 hides: [launcher, panel.indicators]
10298
103− function isReady() {
104− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
105− AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
106− AccountsService.demoEdgesCompleted.indexOf("right") == -1 &&
107− ApplicationManager.count >= 3;
108− }
99+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
100+ AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
101+ AccountsService.demoEdgesCompleted.indexOf("right") == -1 &&
102+ ApplicationManager.count >= 3
109103
110104 Timer {
111105 id: tutorialRightTimer
112106 interval: 3000
113− onTriggered: if (tutorialRight.isReady()) tutorialRight.show()
107+ onTriggered: if (tutorialRight.isReady) tutorialRight.show()
114108 }
115109
116110 Connections {
117111 target: AccountsService
118− onDemoEdgesCompletedChanged: if (tutorialRight.isReady()) tutorialRightTimer.start()
112+ onDemoEdgesCompletedChanged: if (tutorialRight.isReady) tutorialRightTimer.start()
119113 }
120114
121115 Connections {
122116 target: ApplicationManager
123− onApplicationAdded: if (tutorialRight.isReady()) tutorialRight.show()
117+ onApplicationAdded: if (tutorialRight.isReady) tutorialRight.show()
124118 }
125119
126120 onFinished: AccountsService.markDemoEdgeCompleted("right")
@@ -141,33 +135,31 @@ Item {
141135 anchors.fill: parent
142136 hides: [launcher, panel.indicators]
143137
144− function isReady() {
145− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
146− AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
147− AccountsService.demoEdgesCompleted.indexOf("right") != -1 &&
148− AccountsService.demoEdgesCompleted.indexOf("bottom") == -1 &&
149− // focused app is an app known to have a bottom edge
150− (ApplicationManager.focusedApplicationId == "dialer-app" ||
151− ApplicationManager.focusedApplicationId == "webbrowser-app" ||
152− ApplicationManager.focusedApplicationId == "messaging-app" ||
153− ApplicationManager.focusedApplicationId == "camera-app" ||
154− ApplicationManager.focusedApplicationId == "clock-app");
155− }
138+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
139+ AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
140+ AccountsService.demoEdgesCompleted.indexOf("right") != -1 &&
141+ AccountsService.demoEdgesCompleted.indexOf("bottom") == -1 &&
142+ // focused app is an app known to have a bottom edge
143+ (ApplicationManager.focusedApplicationId == "dialer-app" ||
144+ ApplicationManager.focusedApplicationId == "webbrowser-app" ||
145+ ApplicationManager.focusedApplicationId == "messaging-app" ||
146+ ApplicationManager.focusedApplicationId == "camera-app" ||
147+ ApplicationManager.focusedApplicationId == "clock-app")
156148
157149 Timer {
158150 id: tutorialBottomTimer
159151 interval: 3000
160− onTriggered: if (tutorialBottom.isReady()) tutorialBottom.show()
152+ onTriggered: if (tutorialBottom.isReady) tutorialBottom.show()
161153 }
162154
163155 Connections {
164156 target: AccountsService
165− onDemoEdgesCompletedChanged: if (tutorialBottom.isReady()) tutorialBottomTimer.start()
157+ onDemoEdgesCompletedChanged: if (tutorialBottom.isReady) tutorialBottomTimer.start()
166158 }
167159
168160 Connections {
169161 target: ApplicationManager
170− onFocusedApplicationIdChanged: if (tutorialBottom.isReady()) tutorialBottom.show()
162+ onFocusedApplicationIdChanged: if (tutorialBottom.isReady) tutorialBottom.show()
171163 }
172164
173165 onFinished: {