on xenial help sign in
use Ubuntu.Connectivity for online checks
e0bb8ebLukáš Tinkl
qml/Wizard/Pages/30-wifi.qml+2−1
@@ -20,6 +20,7 @@ import QMenuModel 0.1 as QMenuModel
20import Ubuntu.Components 1.3
20import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3
21import Ubuntu.Components.ListItems 1.3
22import Wizard 0.1
22import Wizard 0.1
23+import Ubuntu.Connectivity 1.0
23import ".." as LocalComponents
24import ".." as LocalComponents
24
25
25LocalComponents.Page {
26LocalComponents.Page {
@@ -29,7 +30,7 @@ LocalComponents.Page {
29 title: i18n.tr("Connect to Wi‑Fi")
30 title: i18n.tr("Connect to Wi‑Fi")
30 forwardButtonSourceComponent: forwardButton
31 forwardButtonSourceComponent: forwardButton
31
32
32− readonly property bool connected: Status.online
33+ readonly property bool connected: Connectivity.online
33
34
34 function getExtendedProperty(object, propertyName, defaultValue) {
35 function getExtendedProperty(object, propertyName, defaultValue) {
35 if (object && object.hasOwnProperty(propertyName)) {
36 if (object && object.hasOwnProperty(propertyName)) {
tests/mocks/Ubuntu/Connectivity/plugin.cpp+1
@@ -36,6 +36,7 @@ QmlConnectivityNetworkingPlugin::registerTypes(const char *uri)
36{
36{
37 // @uri Ubuntu.Connectivity
37 // @uri Ubuntu.Connectivity
38 qmlRegisterSingletonType<NetworkingStatus>(uri, 1, 0, "NetworkingStatus", networkingStatusSingletonProvider);
38 qmlRegisterSingletonType<NetworkingStatus>(uri, 1, 0, "NetworkingStatus", networkingStatusSingletonProvider);
39+ qmlRegisterSingletonType<NetworkingStatus>(uri, 1, 0, "Connectivity", networkingStatusSingletonProvider);
39}
40}
40
41
41void
42void