on xenial help sign in
Skip the tutorial entirely when in desktop mode. This fixes the emulator not being able to pass the tutorial.
743fe12Michael Terry
qml/Shell.qml+7−8
@@ -367,20 +367,19 @@ Item {
367 id: tutorial
367 id: tutorial
368 objectName: "tutorial"
368 objectName: "tutorial"
369 anchors.fill: parent
369 anchors.fill: parent
370− active: AccountsService.demoEdges
371− paused: LightDM.Greeter.active
372− launcher: launcher
373− panel: panel
374− edgeSize: shell.edgeSize
375
370
376 // EdgeDragAreas don't work with mice. So to avoid trapping the user,
371 // EdgeDragAreas don't work with mice. So to avoid trapping the user,
377− // we'll tell the tutorial to avoid using them on the Desktop. The
372+ // we skip the tutorial on the Desktop to avoid using them. The
378 // Desktop doesn't use the same spread design anyway. The tutorial is
373 // Desktop doesn't use the same spread design anyway. The tutorial is
379 // all a bit of a placeholder on non-phone form factors right now.
374 // all a bit of a placeholder on non-phone form factors right now.
380 // When the design team gives us more guidance, we can do something
375 // When the design team gives us more guidance, we can do something
381 // more clever here.
376 // more clever here.
382− // TODO: use DeviceConfiguration instead of checking source
377+ active: usageScenario != "desktop" && AccountsService.demoEdges
383− useEdgeDragArea: applicationsDisplayLoader.source != Qt.resolvedUrl("Stages/DesktopStage.qml")
378+
379+ paused: LightDM.Greeter.active
380+ launcher: launcher
381+ panel: panel
382+ edgeSize: shell.edgeSize
384
383
385 onFinished: {
384 onFinished: {
386 AccountsService.demoEdges = false;
385 AccountsService.demoEdges = false;
qml/Tutorial/Tutorial.qml−7
@@ -23,7 +23,6 @@ Item {
23 property alias active: loader.active
23 property alias active: loader.active
24 property bool paused
24 property bool paused
25 property real edgeSize
25 property real edgeSize
26− property bool useEdgeDragArea
27
26
28 property Item launcher
27 property Item launcher
29 property Item panel
28 property Item panel
@@ -59,12 +58,6 @@ Item {
59 value: root.edgeSize
58 value: root.edgeSize
60 }
59 }
61
60
62− Binding {
63− target: loader.item
64− property: "useEdgeDragArea"
65− value: root.useEdgeDragArea
66− }
67−
68 Binding {
61 Binding {
69 target: loader.item
62 target: loader.item
70 property: "launcher"
63 property: "launcher"
qml/Tutorial/TutorialContent.qml+2−9
@@ -32,7 +32,6 @@ Item {
32
32
33 property bool paused: false
33 property bool paused: false
34 property real edgeSize
34 property real edgeSize
35− property bool useEdgeDragArea
36
35
37 signal finished()
36 signal finished()
38
37
@@ -78,17 +77,11 @@ Item {
78 anchors.fill: parent
77 anchors.fill: parent
79 textXOffset: root.launcher.panelWidth
78 textXOffset: root.launcher.panelWidth
80 paused: !shown || root.paused
79 paused: !shown || root.paused
81− text: root.useEdgeDragArea ? i18n.tr("Tap here to continue.") : i18n.tr("Click here to finish.")
80+ text: i18n.tr("Tap here to continue.")
82
81
83 onFinished: {
82 onFinished: {
84 root.launcher.hide();
83 root.launcher.hide();
85− if (root.useEdgeDragArea) {
86− tutorialRight.show();
84+ tutorialRight.show();
87− } else {
88− // Last two screens use EdgeDragArea (right edge spread and
89− // bottom edge). So just end tutorial here.
90− root.finish();
91− }
92 }
85 }
93 }
86 }
94
87
tests/qmltests/Tutorial/tst_Tutorial.qml+7−5
@@ -263,12 +263,14 @@ Item {
263 goToPage(null);
263 goToPage(null);
264 }
264 }
265
265
266− function test_walkthroughOnDesktop() {
266+ function test_skipOnDesktop() {
267+ var tutorial = findChild(shell, "tutorial");
268+ tryCompare(tutorial, "active", true);
269+ tryCompare(tutorial, "running", true);
270+
267 shell.usageScenario = "desktop";
271 shell.usageScenario = "desktop";
268− var page = goToPage("tutorialLeftFinish");
272+ tryCompare(tutorial, "active", false);
269− var tick = findChild(page, "tick");
273+ tryCompare(tutorial, "running", false);
270− tap(tick);
271− checkFinished();
272 }
274 }
273
275
274 function test_launcherShortDrag() {
276 function test_launcherShortDrag() {