on xenial help sign in
initiate the check + fix the mock
113dac2Lukáš Tinkl
qml/Wizard/Pages/30-wifi.qml+9−3
@@ -20,6 +20,7 @@ import QMenuModel 0.1 as QMenuModel
20import Ubuntu.Components 1.3
20import Ubuntu.Components 1.3
21import Wizard 0.1
21import Wizard 0.1
22import Ubuntu.Connectivity 1.0
22import Ubuntu.Connectivity 1.0
23+import Ubuntu.SystemImage 0.1
23import ".." as LocalComponents
24import ".." as LocalComponents
24
25
25LocalComponents.Page {
26LocalComponents.Page {
@@ -158,9 +159,9 @@ LocalComponents.Page {
158 anchors.right: parent.right
159 anchors.right: parent.right
159 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
160 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
160 font.weight: Font.Light
161 font.weight: Font.Light
161− color: "#68064d"
162+ color: textColor
162 wrapMode: Text.Wrap
163 wrapMode: Text.Wrap
163− text: listview.count > 0 ? i18n.tr("Available Wi-Fi networks")
164+ text: listview.count > 0 ? i18n.tr("Select one of the available Wi-Fi networks to access the latest features and updates.")
164 : i18n.tr("No available Wi-Fi networks")
165 : i18n.tr("No available Wi-Fi networks")
165 }
166 }
166
167
@@ -204,7 +205,12 @@ LocalComponents.Page {
204 id: forwardButton
205 id: forwardButton
205 LocalComponents.StackButton {
206 LocalComponents.StackButton {
206 text: (connected || listview.count === 0) ? i18n.tr("Next") : i18n.tr("Skip")
207 text: (connected || listview.count === 0) ? i18n.tr("Next") : i18n.tr("Skip")
208+ onClicked: {
209+ if (connected) {
210+ SystemImage.checkForUpdate(); // initiate the background check for System Update
211+ }
207− onClicked: pageStack.next()
212+ pageStack.next();
213+ }
208 }
214 }
209 }
215 }
210}
216}
tests/mocks/Ubuntu/SystemImage/MockSystemImage.h+2−1
@@ -1,5 +1,5 @@
1/*
1/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014-2016 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
@@ -27,6 +27,7 @@ class MockSystemImage : public QObject
27public:
27public:
28 explicit MockSystemImage(QObject *parent = 0);
28 explicit MockSystemImage(QObject *parent = 0);
29
29
30+ Q_INVOKABLE void checkForUpdate() {}
30 Q_INVOKABLE void factoryReset();
31 Q_INVOKABLE void factoryReset();
31
32
32Q_SIGNALS:
33Q_SIGNALS: