on xenial help sign in
cleanup
b41095bMichael Zanetti
qml/Shell.qml+5−3
@@ -42,6 +42,7 @@ import Unity.DashCommunicator 0.1
42import Unity.Indicators 0.1 as Indicators
42import Unity.Indicators 0.1 as Indicators
43import Cursor 1.0
43import Cursor 1.0
44
44
45+
45Item {
46Item {
46 id: shell
47 id: shell
47
48
@@ -97,14 +98,15 @@ Item {
97 property var modeSwitchWarningPopup: null
98 property var modeSwitchWarningPopup: null
98 onUsageScenarioChanged: {
99 onUsageScenarioChanged: {
99 if (usageScenario != "desktop" && legacyAppsModel.count > 0 && !modeSwitchWarningPopup) {
100 if (usageScenario != "desktop" && legacyAppsModel.count > 0 && !modeSwitchWarningPopup) {
100− var popup = PopupUtils.open(Qt.resolvedUrl("Components/ModeSwitchWarningDialog.qml"), shell, {model: legacyAppsModel})
101+ var popup = PopupUtils.open(Qt.resolvedUrl("Components/ModeSwitchWarningDialog.qml"), shell, {model: legacyAppsModel});
101 popup.forceClose.connect(function() {
102 popup.forceClose.connect(function() {
102 while (legacyAppsModel.count > 0) {
103 while (legacyAppsModel.count > 0) {
103− ApplicationManager.stopApplication(legacyAppsModel.get(0).appId)
104+ ApplicationManager.stopApplication(legacyAppsModel.get(0).appId);
104 }
105 }
105 })
106 })
106 } else if (usageScenario == "desktop" && modeSwitchWarningPopup) {
107 } else if (usageScenario == "desktop" && modeSwitchWarningPopup) {
107− PopupUtls.close(modeSwitchWarningPopup)
108+ PopupUtls.close(modeSwitchWarningPopup);
109+ modeSwitchWarningPopup = null;
108 }
110 }
109 }
111 }
110
112
tests/qmltests/Components/tst_ModeSwitchWarningDialog.qml+2−2
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2015 Canonical Ltd.
3 *
3 *
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
5 * it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ Rectangle {
34 }
34 }
35
35
36 function openWarning() {
36 function openWarning() {
37− return PopupUtils.open(Qt.resolvedUrl("../../../qml/Components/ModeSwitchWarningDialog.qml"), root, { model: fakeModel })
37+ return PopupUtils.open(Qt.resolvedUrl("../../../qml/Components/ModeSwitchWarningDialog.qml"), root, { model: fakeModel });
38 }
38 }
39
39
40 Button {
40 Button {