Merge lp:~ken-vandine/ubuntu-system-settings/fix-1363400 into lp:~cimi/ubuntu-system-settings/fix-1363400

Proposed by Ken VanDine
Status: Needs review
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/fix-1363400
Merge into: lp:~cimi/ubuntu-system-settings/fix-1363400
Diff against target: 28 lines (+1/-13)
1 file modified
wizard/qml/Pages/40-wifi.qml (+1/-13)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/fix-1363400
Reviewer Review Type Date Requested Status
Sebastien Bacher (community) Needs Information
Andrea Cimitan Disapprove
Review via email: mp+247341@code.launchpad.net

Commit message

Ensure accessPointName gets set when status and currentMode changes too.

Description of the change

Ensure accessPointName gets set when status and currentMode changes too.

To post a comment you must log in.
968. By Ken VanDine

More QML friendly

Revision history for this message
Andrea Cimitan (cimi) wrote :

we can not rely on currentNetworkMode to change, since it doesn't (try on desktop), and networkStatus and networkName are not bindings, so it doesn't get retriggered and updated when you switch wifi

review: Disapprove
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug mentioned in the url is fixed, is that still current or should it be closed?

review: Needs Information
Revision history for this message
Sebastien Bacher (seb128) wrote :

Ken?

Unmerged revisions

968. By Ken VanDine

More QML friendly

967. By Ken VanDine

Ensure accessPointName gets set when status and currentMode changes too.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'wizard/qml/Pages/40-wifi.qml'
2--- wizard/qml/Pages/40-wifi.qml 2015-01-21 12:56:33 +0000
3+++ wizard/qml/Pages/40-wifi.qml 2015-01-22 18:35:20 +0000
4@@ -47,23 +47,11 @@
5 NetworkInfo {
6 id: networkInfo
7
8- property string accessPointName: getAccessPointName()
9+ property string accessPointName: (networkStatus(NetworkInfo.WlanMode, 0) === NetworkInfo.HomeNetwork) && (currentNetworkMode === NetworkInfo.WlanMode) ? networkName(NetworkInfo.WlanMode, 0) : ""
10
11 monitorCurrentNetworkMode: true
12 monitorNetworkName: true
13 monitorNetworkStatus: true
14-
15- onNetworkNameChanged: getAccessPointName()
16- onNetworkStatusChanged: if (status !== NetworkInfo.HomeNetwork) accessPointName = ""
17-
18- function getAccessPointName() {
19- // 0 is the interface
20- if (currentNetworkMode === NetworkInfo.WlanMode &&
21- networkStatus(NetworkInfo.WlanMode, 0) === NetworkInfo.HomeNetwork)
22- accessPointName = networkName(NetworkInfo.WlanMode, 0);
23- else
24- accessPointName = "";
25- }
26 }
27
28 Component {

Subscribers

People subscribed via source and target branches

to all changes: