on xenial help sign in
initiate the check + fix the mock
commit113dac2973fb4e8b14315bb663756f0fb8f9700a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 13 Jul 2016, 12:57 (10 years ago) parentbd146a0
2 files changed+11−4
qml/Wizard/Pages/30-wifi.qml+9−3 tests/mocks/Ubuntu/SystemImage/MockSystemImage.h+2−1
qml/Wizard/Pages/30-wifi.qml+9−3
@@ -20,6 +20,7 @@ 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
2324import ".." as LocalComponents
2425
2526LocalComponents.Page {
@@ -158,9 +159,9 @@ LocalComponents.Page {
158159 anchors.right: parent.right
159160 anchors.leftMargin: column.anchors.leftMargin == 0 ? staticMargin : 0
160161 font.weight: Font.Light
161− color: "#68064d"
162+ color: textColor
162163 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.")
164165 : i18n.tr("No available Wi-Fi networks")
165166 }
166167
@@ -204,7 +205,12 @@ LocalComponents.Page {
204205 id: forwardButton
205206 LocalComponents.StackButton {
206207 text: (connected || listview.count === 0) ? i18n.tr("Next") : i18n.tr("Skip")
207− onClicked: pageStack.next()
208+ onClicked: {
209+ if (connected) {
210+ SystemImage.checkForUpdate(); // initiate the background check for System Update
211+ }
212+ pageStack.next();
213+ }
208214 }
209215 }
210216}
tests/mocks/Ubuntu/SystemImage/MockSystemImage.h+2−1
@@ -1,5 +1,5 @@
11/*
2− * Copyright (C) 2014 Canonical, Ltd.
2+ * Copyright (C) 2014-2016 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
@@ -27,6 +27,7 @@ class MockSystemImage : public QObject
2727public:
2828 explicit MockSystemImage(QObject *parent = 0);
2929
30+ Q_INVOKABLE void checkForUpdate() {}
3031 Q_INVOKABLE void factoryReset();
3132
3233Q_SIGNALS: