on xenial help sign in
drop SystemImage from QML
commit28d73d70ff84f25cbca0bd95a3e7f80ca61e254a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 22 Mar 2017, 18:40 (10 years ago) parent33c2717
5 files changed−195
qml/Greeter/Greeter.qml−3 qml/Wizard/Pages/30-wifi.qml−4 qml/Wizard/Pages/77-system-update.qml−156 tests/qmltests/Wizard/tst_Wizard.qml−6 tests/qmltests/tst_ShellWithPin.qml−26
qml/Greeter/Greeter.qml−3
@@ -20,7 +20,6 @@ import Biometryd 0.0
2020import GSettings 1.0
2121import Powerd 0.1
2222import Ubuntu.Components 1.3
23−import Ubuntu.SystemImage 0.1
2423import Unity.Launcher 0.1
2524import Unity.Session 0.1
2625
@@ -473,8 +472,6 @@ Showable {
473472 if (maxFailedLogins >= 2) { // require at least a warning
474473 if (AccountsService.failedLogins === maxFailedLogins - 1) {
475474 loader.item.showLastChance();
476− } else if (AccountsService.failedLogins >= maxFailedLogins) {
477− SystemImage.factoryReset(); // Ouch!
478475 }
479476 }
480477
qml/Wizard/Pages/30-wifi.qml−4
@@ -20,7 +20,6 @@ import QMenuModel 0.1 as QMenuModel
2020import Ubuntu.Components 1.3
2121import Wizard 0.1
2222import Ubuntu.Connectivity 1.0
23−import Ubuntu.SystemImage 0.1
2423import ".." as LocalComponents
2524import "../../Components"
2625
@@ -206,9 +205,6 @@ LocalComponents.Page {
206205 LocalComponents.StackButton {
207206 text: (connected || listview.count === 0) ? i18n.tr("Next") : i18n.tr("Skip")
208207 onClicked: {
209− if (connected) {
210− SystemImage.checkForUpdate(); // initiate the background check for System Update
211− }
212208 pageStack.next();
213209 }
214210 }
qml/Wizard/Pages/77-system-update.qmldeleted−156
@@ -1,156 +0,0 @@
1−/*
2− * Copyright (C) 2016 Canonical, Ltd.
3− *
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
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import QtQuick.Layouts 1.1
19−import Ubuntu.Components 1.3
20−import Ubuntu.SystemImage 0.1
21−import Wizard 0.1
22−import ".." as LocalComponents
23−
24−LocalComponents.Page {
25− id: systemUpdatePage
26− objectName: "systemUpdatePage"
27−
28− title: i18n.tr("Update Device")
29− forwardButtonSourceComponent: forwardButton
30−
31− skip: !SystemImage.updateDownloaded // skip the page when the system update is not ready to install
32−
33− Column {
34− id: column
35− anchors {
36− fill: content
37− leftMargin: systemUpdatePage.leftMargin
38− rightMargin: systemUpdatePage.rightMargin
39− topMargin: systemUpdatePage.customMargin
40− }
41− spacing: units.gu(3)
42− opacity: spinner.running ? 0.5 : 1
43− Behavior on opacity {
44− UbuntuNumberAnimation {}
45− }
46−
47− Label {
48− anchors.left: parent.left
49− anchors.right: parent.right
50− anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
51− font.weight: Font.Light
52− color: textColor
53− wrapMode: Text.Wrap
54− fontSize: "small"
55− text: i18n.tr("There is a system update available and ready to install. Afterwards, the device will automatically restart.")
56− }
57−
58− GridLayout {
59− rows: 3
60− columns: 2
61− rowSpacing: units.gu(1)
62− columnSpacing: units.gu(2)
63−
64− Image {
65− Layout.rowSpan: 3
66− Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
67− sourceSize: Qt.size(units.gu(3), units.gu(3))
68− fillMode: Image.PreserveAspectFit
69− source: "image://theme/distributor-logo"
70− }
71−
72− Label {
73− color: textColor
74− font.weight: Font.Normal
75− fontSize: "small"
76− text: i18n.ctr("string identifying name of the update", "Ubuntu system")
77− }
78−
79− Label {
80− font.weight: Font.Light
81− fontSize: "small"
82− color: textColor
83− text: i18n.ctr("version of the system update", "Version %1").arg(SystemImage.availableVersion)
84− }
85−
86− Label {
87− font.weight: Font.Light
88− fontSize: "small"
89− color: textColor
90− text: SystemImage.updateSize
91− }
92− }
93−
94− Label {
95− anchors.left: parent.left
96− anchors.right: parent.right
97− anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
98− font.weight: Font.Light
99− color: textColor
100− wrapMode: Text.Wrap
101− fontSize: "small"
102− text: i18n.tr("This could take a few minutes...")
103− }
104−
105− Rectangle {
106− anchors.left: parent.left
107− anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
108− color: theme.palette.normal.foreground
109− radius: units.dp(4)
110− width: buttonLabel.paintedWidth + units.gu(3)
111− height: buttonLabel.paintedHeight + units.gu(1.8)
112−
113− Label {
114− id: buttonLabel
115− color: textColor
116− text: i18n.tr("Install and restart now")
117− font.weight: Font.Light
118− anchors.centerIn: parent
119− }
120−
121− AbstractButton {
122− id: button
123− objectName: "installButton"
124− anchors.fill: parent
125− onClicked: {
126− System.skipUntilFinishedPage();
127− SystemImage.applyUpdate();
128− }
129− }
130−
131− transformOrigin: Item.Top
132− scale: button.pressed ? 0.98 : 1.0
133− Behavior on scale {
134− ScaleAnimator {
135− duration: UbuntuAnimation.SnapDuration
136− easing.type: Easing.Linear
137− }
138− }
139− }
140− }
141−
142− ActivityIndicator {
143− id: spinner
144− anchors.centerIn: systemUpdatePage
145− running: SystemImage.updateApplying
146− visible: running
147− }
148−
149− Component {
150− id: forwardButton
151− LocalComponents.StackButton {
152− text: i18n.tr("Skip")
153− onClicked: pageStack.next()
154− }
155− }
156−}
tests/qmltests/Wizard/tst_Wizard.qml−6
@@ -336,8 +336,6 @@ Item {
336336 // now finish up
337337 page = waitForPage("reportingPage");
338338 tap(findChild(page, "forwardButton"));
339− page = waitForPage("systemUpdatePage");
340− tap(findChild(page, "forwardButton"));
341339 page = waitForPage("finishedPage");
342340 waitUntilTransitionsEnd(page);
343341 tap(findChild(page, "finishButton"));
@@ -378,8 +376,6 @@ Item {
378376 // now finish up
379377 page = waitForPage("reportingPage");
380378 tap(findChild(page, "forwardButton"));
381− page = waitForPage("systemUpdatePage");
382− tap(findChild(page, "forwardButton"));
383379 page = waitForPage("finishedPage");
384380 waitUntilTransitionsEnd(page);
385381 tap(findChild(page, "finishButton"));
@@ -398,8 +394,6 @@ Item {
398394 tap(findChild(page, "forwardButton"));
399395 page = waitForPage("reportingPage");
400396 tap(findChild(page, "forwardButton"));
401− page = waitForPage("systemUpdatePage");
402− tap(findChild(page, "forwardButton"));
403397 page = waitForPage("finishedPage");
404398 waitUntilTransitionsEnd(page);
405399 tap(findChild(page, "finishButton"));
tests/qmltests/tst_ShellWithPin.qml−26
@@ -21,7 +21,6 @@ import AccountsService 0.1
2121import GSettings 1.0
2222import LightDMController 0.1
2323import LightDM.FullLightDM 0.1 as LightDM
24−import Ubuntu.SystemImage 0.1
2524import Ubuntu.Telephony 0.1 as Telephony
2625import Unity.Application 0.1
2726import Unity.Test 0.1 as UT
@@ -112,12 +111,6 @@ Item {
112111 signalName: "sessionStarted"
113112 }
114113
115− SignalSpy {
116− id: resetSpy
117− target: SystemImage
118− signalName: "resettingDevice"
119− }
120−
121114 Telephony.CallEntry {
122115 id: phoneCall
123116 phoneNumber: "+447812221111"
@@ -373,25 +366,6 @@ Item {
373366 tryCompare(delayedLockscreen, "delayMinutes", greeter.failedLoginsDelayMinutes);
374367 }
375368
376− function test_factoryReset() {
377− skip("Factory reset support is not finished")
378−
379− maxRetriesTextField.text = "3"
380− resetSpy.clear()
381−
382− enterPin("1111")
383− enterPin("1111")
384−
385− var dialog = findChild(root, "infoPopup")
386− var button = findChild(dialog, "infoPopupOkButton")
387− tap(button)
388− tryCompareFunction(function() {return findChild(root, "infoPopup", 0 /* timeout */)}, null)
389−
390− tryCompare(resetSpy, "count", 0)
391− enterPin("1111")
392− tryCompare(resetSpy, "count", 1)
393− }
394−
395369 function test_emergencyDialerLockOut() {
396370 // This is a theoretical attack on the lockscreen: Enter emergency
397371 // dialer mode on a phone, then plug into a larger screen,