on xenial help sign in
minor fixes
commit0f359402e3342eeda732d81d69a5ae20490cd3da authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 18 Jul 2016, 11:22 (10 years ago) parent9ae5a0e
4 files changed+11−11
plugins/Ubuntu/SystemImage/SystemImage.cpp−7 plugins/Ubuntu/SystemImage/SystemImage.h−1 qml/Wizard/Pages/30-wifi.qml+10−2 tests/mocks/Ubuntu/SystemImage/MockSystemImage.cpp+1−1
plugins/Ubuntu/SystemImage/SystemImage.cpp−7
@@ -40,8 +40,6 @@ SystemImage::SystemImage(QObject *parent)
4040 this, SLOT(onUpdateApplied(bool)));
4141 QDBusConnection::systemBus().connect(SYSTEMIMAGE_SERVICE, SYSTEMIMAGE_PATH, SYSTEMIMAGE_IFACE, QStringLiteral("Rebooting"),
4242 this, SLOT(onRebooting(bool)));
43− QDBusConnection::systemBus().connect(SYSTEMIMAGE_SERVICE, SYSTEMIMAGE_PATH, SYSTEMIMAGE_IFACE, QStringLiteral("UpdateProgress"),
44− this, SLOT(onUpdateProgress(int,double)));
4543}
4644
4745void SystemImage::checkForUpdate()
@@ -115,11 +113,6 @@ void SystemImage::onUpdateApplied(bool applied)
115113 }
116114}
117115
118−void SystemImage::onUpdateProgress(int percentage, double eta)
119−{
120− qDebug() << "!!! Download progress:" << percentage << "%, ETA seconds:" << eta;
121−}
122−
123116void SystemImage::onRebooting(bool status)
124117{
125118 setUpdateApplying(false);
plugins/Ubuntu/SystemImage/SystemImage.h−1
@@ -54,7 +54,6 @@ private Q_SLOTS:
5454 void onUpdateDownloaded();
5555 void onUpdateFailed(int consecutive_failure_count, const QString & last_reason);
5656 void onUpdateApplied(bool applied);
57− void onUpdateProgress(int percentage, double eta);
5857 void onRebooting(bool status);
5958
6059Q_SIGNALS:
qml/Wizard/Pages/30-wifi.qml+10−2
@@ -69,6 +69,16 @@ LocalComponents.Page {
6969 menuObjectPath: "/com/canonical/indicator/network/phone_wifi_settings"
7070 }
7171
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+
7282 Component {
7383 id: accessPointComponent
7484 ListItem {
@@ -161,8 +171,6 @@ LocalComponents.Page {
161171 font.weight: Font.Light
162172 color: textColor
163173 wrapMode: Text.Wrap
164− text: listview.count > 0 ? i18n.tr("Available Wi-Fi networks")
165− : i18n.tr("No available Wi-Fi networks")
166174 }
167175
168176 ListView {
tests/mocks/Ubuntu/SystemImage/MockSystemImage.cpp+1−1
@@ -33,7 +33,7 @@ void MockSystemImage::applyUpdate()
3333{
3434 qDebug() << "Applying a fake system update";
3535 setUpdateApplying(true);
36− QTimer::singleShot(5000, [this] {setUpdateApplying(false);});
36+ QTimer::singleShot(3000, [this] {setUpdateApplying(false);});
3737}
3838
3939void MockSystemImage::factoryReset()