on xenial help sign in
minor fixes
0f35940Lukáš Tinkl
plugins/Ubuntu/SystemImage/SystemImage.cpp−7
@@ -40,8 +40,6 @@ SystemImage::SystemImage(QObject *parent)
40 this, SLOT(onUpdateApplied(bool)));
40 this, SLOT(onUpdateApplied(bool)));
41 QDBusConnection::systemBus().connect(SYSTEMIMAGE_SERVICE, SYSTEMIMAGE_PATH, SYSTEMIMAGE_IFACE, QStringLiteral("Rebooting"),
41 QDBusConnection::systemBus().connect(SYSTEMIMAGE_SERVICE, SYSTEMIMAGE_PATH, SYSTEMIMAGE_IFACE, QStringLiteral("Rebooting"),
42 this, SLOT(onRebooting(bool)));
42 this, SLOT(onRebooting(bool)));
43− QDBusConnection::systemBus().connect(SYSTEMIMAGE_SERVICE, SYSTEMIMAGE_PATH, SYSTEMIMAGE_IFACE, QStringLiteral("UpdateProgress"),
44− this, SLOT(onUpdateProgress(int,double)));
45}
43}
46
44
47void SystemImage::checkForUpdate()
45void SystemImage::checkForUpdate()
@@ -115,11 +113,6 @@ void SystemImage::onUpdateApplied(bool applied)
115 }
113 }
116}
114}
117
115
118−void SystemImage::onUpdateProgress(int percentage, double eta)
119−{
120− qDebug() << "!!! Download progress:" << percentage << "%, ETA seconds:" << eta;
121−}
122−
123void SystemImage::onRebooting(bool status)
116void SystemImage::onRebooting(bool status)
124{
117{
125 setUpdateApplying(false);
118 setUpdateApplying(false);
plugins/Ubuntu/SystemImage/SystemImage.h−1
@@ -54,7 +54,6 @@ private Q_SLOTS:
54 void onUpdateDownloaded();
54 void onUpdateDownloaded();
55 void onUpdateFailed(int consecutive_failure_count, const QString & last_reason);
55 void onUpdateFailed(int consecutive_failure_count, const QString & last_reason);
56 void onUpdateApplied(bool applied);
56 void onUpdateApplied(bool applied);
57− void onUpdateProgress(int percentage, double eta);
58 void onRebooting(bool status);
57 void onRebooting(bool status);
59
58
60Q_SIGNALS:
59Q_SIGNALS:
qml/Wizard/Pages/30-wifi.qml+10−2
@@ -69,6 +69,16 @@ LocalComponents.Page {
69 menuObjectPath: "/com/canonical/indicator/network/phone_wifi_settings"
69 menuObjectPath: "/com/canonical/indicator/network/phone_wifi_settings"
70 }
70 }
71
71
72+ onContentAnimationRunningChanged: {
73+ // workaround to prevent an endless loop while animating the (possibly word wrapped) label in and the listview count changing
74+ if (!contentAnimationRunning) {
75+ label.text = listview.count > 0 ? i18n.tr("Select one of the available Wi-Fi networks to access the features and updates")
76+ : i18n.tr("No available Wi-Fi networks");
77+ } else {
78+ label.text = "";
79+ }
80+ }
81+
72 Component {
82 Component {
73 id: accessPointComponent
83 id: accessPointComponent
74 ListItem {
84 ListItem {
@@ -161,8 +171,6 @@ LocalComponents.Page {
161 font.weight: Font.Light
171 font.weight: Font.Light
162 color: textColor
172 color: textColor
163 wrapMode: Text.Wrap
173 wrapMode: Text.Wrap
164− text: listview.count > 0 ? i18n.tr("Available Wi-Fi networks")
165− : i18n.tr("No available Wi-Fi networks")
166 }
174 }
167
175
168 ListView {
176 ListView {
tests/mocks/Ubuntu/SystemImage/MockSystemImage.cpp+1−1
@@ -33,7 +33,7 @@ void MockSystemImage::applyUpdate()
33{
33{
34 qDebug() << "Applying a fake system update";
34 qDebug() << "Applying a fake system update";
35 setUpdateApplying(true);
35 setUpdateApplying(true);
36− QTimer::singleShot(5000, [this] {setUpdateApplying(false);});
36+ QTimer::singleShot(3000, [this] {setUpdateApplying(false);});
37}
37}
38
38
39void MockSystemImage::factoryReset()
39void MockSystemImage::factoryReset()