on xenial help sign in
try harder to filter out enterprise wifis
fe8c9d3Lukáš Tinkl
qml/Wizard/Pages/30-wifi.qml+10−4
@@ -85,7 +85,6 @@ LocalComponents.Page {
85 }
85 }
86 readonly property bool secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
86 readonly property bool secure: getExtendedProperty(extendedData, "xCanonicalWifiApIsSecure", false)
87 readonly property bool adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
87 readonly property bool adHoc: getExtendedProperty(extendedData, "xCanonicalWifiApIsAdhoc", false)
88− readonly property bool enterprise: getExtendedProperty(extendedData, "xCanonicalWifiApIsEnterprise", false)
89 property int signalStrength: strengthAction.valid ? strengthAction.state : 0
88 property int signalStrength: strengthAction.valid ? strengthAction.state : 0
90 property int menuIndex: -1
89 property int menuIndex: -1
91
90
@@ -93,12 +92,11 @@ LocalComponents.Page {
93 if (!unityMenuModel || menuIndex == -1) return;
92 if (!unityMenuModel || menuIndex == -1) return;
94 unityMenuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool',
93 unityMenuModel.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool',
95 'x-canonical-wifi-ap-is-secure': 'bool',
94 'x-canonical-wifi-ap-is-secure': 'bool',
96− 'x-canonical-wifi-ap-is-enterprise': 'bool',
97 'x-canonical-wifi-ap-strength-action': 'string'});
95 'x-canonical-wifi-ap-strength-action': 'string'});
98 }
96 }
99
97
100 text: menuData && menuData.label || ""
98 text: menuData && menuData.label || ""
101− enabled: menuData && menuData.sensitive && !enterprise || false
99+ enabled: menuData && menuData.sensitive || false
102 __foregroundColor: textColor
100 __foregroundColor: textColor
103 showDivider: true
101 showDivider: true
104 iconName: {
102 iconName: {
@@ -175,7 +173,15 @@ LocalComponents.Page {
175 anchors.left: parent.left
173 anchors.left: parent.left
176 anchors.right: parent.right
174 anchors.right: parent.right
177 asynchronous: true
175 asynchronous: true
178− sourceComponent: isAccessPoint ? accessPointComponent : null
176+ sourceComponent: {
177+ if (isAccessPoint) {
178+ menuModel.loadExtendedAttributes(index, {'x-canonical-wifi-ap-is-enterprise': 'bool'}); // filter out enterprise wifis, lpbug:#1475023
179+ if (!getExtendedProperty(menuModel.ext, "xCanonicalWifiApIsEnterprise", false)) {
180+ return accessPoint;
181+ }
182+ return null;
183+ }
184+ }
179
185
180 onLoaded: {
186 onLoaded: {
181 item.menuData = Qt.binding(function() { return model; });
187 item.menuData = Qt.binding(function() { return model; });