on xenial help sign in
cleanup
commitb41095bc1ba7e8a08be1b6ad8dc12675b764f37a authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 28 Oct 2015, 11:45 (11 years ago) parent23ba7e0
2 files changed+7−5
qml/Shell.qml+5−3 tests/qmltests/Components/tst_ModeSwitchWarningDialog.qml+2−2
qml/Shell.qml+5−3
@@ -42,6 +42,7 @@ import Unity.DashCommunicator 0.1
4242import Unity.Indicators 0.1 as Indicators
4343import Cursor 1.0
4444
45+
4546Item {
4647 id: shell
4748
@@ -97,14 +98,15 @@ Item {
9798 property var modeSwitchWarningPopup: null
9899 onUsageScenarioChanged: {
99100 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});
101102 popup.forceClose.connect(function() {
102103 while (legacyAppsModel.count > 0) {
103− ApplicationManager.stopApplication(legacyAppsModel.get(0).appId)
104+ ApplicationManager.stopApplication(legacyAppsModel.get(0).appId);
104105 }
105106 })
106107 } else if (usageScenario == "desktop" && modeSwitchWarningPopup) {
107− PopupUtls.close(modeSwitchWarningPopup)
108+ PopupUtls.close(modeSwitchWarningPopup);
109+ modeSwitchWarningPopup = null;
108110 }
109111 }
110112
tests/qmltests/Components/tst_ModeSwitchWarningDialog.qml+2−2
@@ -1,5 +1,5 @@
11/*
2− * Copyright 2014 Canonical Ltd.
2+ * Copyright 2015 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@ Rectangle {
3434 }
3535
3636 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 });
3838 }
3939
4040 Button {