Merge lp:~nick-dedekind/ubuntu-system-settings/1390136.laggy-backends into lp:ubuntu-system-settings
- 1390136.laggy-backends
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Ken VanDine |
Approved revision: | 1358 |
Merged at revision: | 1390 |
Proposed branch: | lp:~nick-dedekind/ubuntu-system-settings/1390136.laggy-backends |
Merge into: | lp:ubuntu-system-settings |
Diff against target: |
400 lines (+121/-52) 8 files modified
debian/control (+1/-1) plugins/battery/PageComponent.qml (+28/-12) plugins/bluetooth/PageComponent.qml (+9/-3) plugins/brightness/PageComponent.qml (+15/-9) plugins/flight-mode/EntryComponent.qml (+11/-4) plugins/sound/PageComponent.qml (+23/-11) plugins/wifi/MenuItemFactory.qml (+31/-12) plugins/wifi/PageComponent.qml (+3/-0) |
To merge this branch: | bzr merge lp:~nick-dedekind/ubuntu-system-settings/1390136.laggy-backends |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ken VanDine | Needs Fixing | ||
Jonas G. Drange (community) | Needs Fixing | ||
Sebastien Bacher (community) | Needs Fixing | ||
Review via email:
|
Commit message
Fix for laggy backends (lp#1390136)
Description of the change
Fix for laggy backends (lp#1390136)
Requires:
lp:~nick-dedekind/ubuntu-settings-components/1390136.laggy-backends
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1348
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1349
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Sebastien Bacher (seb128) wrote : | # |
Thanks, I didn't review the code yet, but you need to update the u-s-c depends to 0.6 in debian/control
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> Thanks, I didn't review the code yet, but you need to update the u-s-c depends
> to 0.6 in debian/control
We have a silo for it yet, so I've kept this change back so we can get the debs.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
I mean we "don't" have a silo.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1350
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1351
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jonas G. Drange (jonas-drange) wrote : | # |
Nick, those AP test failures seems consistent and may be actual failures. Maybe resync trunk and check out this [1] error message? Missing/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> Nick, those AP test failures seems consistent and may be actual failures.
> Maybe resync trunk and check out this [1] error message? Missing/
> import?
>
> [1] http://
Requires lp:~nick-dedekind/ubuntu-settings-components/1390136.laggy-backends to function.
I haven't bumped the USC version requirement yet so it will build in CI; to test using the output packages.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
If someone will verify they are happy with the code changes, I can get a silo ready so that all the tests can be verified.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1352
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ken VanDine (ken-vandine) wrote : | # |
I'm fine with the code changes, but I would like to see CI passing. I guess there's no way we can see CI pass until USC lands in vivid right? Have you confirmed 100% pass on your device?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1353
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1355
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> I'm fine with the code changes, but I would like to see CI passing. I guess
> there's no way we can see CI pass until USC lands in vivid right? Have you
> confirmed 100% pass on your device?
I've run the AP tests on device and they all pass (there are some invalid skips which I've spoken to jgdx about).
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1357
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ken VanDine (ken-vandine) wrote : | # |
Thanks for confirming the tests pass on your device, I'll approve the code changes. Lets run the AP tests again from the silo as part of the acceptance criteria.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1357
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1357
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ken VanDine (ken-vandine) wrote : | # |
Now that the needed dependencies are in vivid, I would expect the tests to pass. There is still a consistent failure, that doesn't exist in trunk. It doesn't look like a test that should be affected by this branch, but perhaps a previous test screwed up the state. It needs another look at least.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1357
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1357
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ken VanDine (ken-vandine) wrote : | # |
OK, nice to see CI passing, ignore my last comment
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ken VanDine (ken-vandine) wrote : | # |
QA verification found a regression in the wifi plugin:
1. click "forget" on your current network
2. switch the wifi switch to off
3. switch the wifi switch back to on
4. select your previous wifi network
Expected: prompt to login to network
Actual: wifi switch changes back to off
- 1358. By Nick Dedekind
-
use menuIndex property
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nick Dedekind (nick-dedekind) wrote : | # |
> QA verification found a regression in the wifi plugin:
>
> 1. click "forget" on your current network
> 2. switch the wifi switch to off
> 3. switch the wifi switch back to on
> 4. select your previous wifi network
>
> Expected: prompt to login to network
>
> Actual: wifi switch changes back to off
Looks like there was a problem with the item indexes being used from a parent property. Fixed.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1358
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'debian/control' |
2 | --- debian/control 2015-04-01 12:35:10 +0000 |
3 | +++ debian/control 2015-04-20 15:09:06 +0000 |
4 | @@ -74,7 +74,7 @@ |
5 | qtdeclarative5-ofono0.2 (>=0.70~), |
6 | qtdeclarative5-systeminfo-plugin, |
7 | qtdeclarative5-ubuntu-content1, |
8 | - qtdeclarative5-ubuntu-settings-components (>> 0.2), |
9 | + qtdeclarative5-ubuntu-settings-components (>> 0.6), |
10 | qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.1.1347) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.1.1347), |
11 | suru-icon-theme, |
12 | whoopsie-preferences (>= 0.9), |
13 | |
14 | === modified file 'plugins/battery/PageComponent.qml' |
15 | --- plugins/battery/PageComponent.qml 2015-04-13 15:08:41 +0000 |
16 | +++ plugins/battery/PageComponent.qml 2015-04-20 15:09:06 +0000 |
17 | @@ -27,6 +27,7 @@ |
18 | import Ubuntu.Components.ListItems 0.1 as ListItem |
19 | import Ubuntu.SystemSettings.Battery 1.0 |
20 | import Ubuntu.SystemSettings.SecurityPrivacy 1.0 |
21 | +import Ubuntu.Settings.Components 0.1 as USC |
22 | |
23 | ItemPage { |
24 | id: root |
25 | @@ -344,13 +345,18 @@ |
26 | sourceComponent: Switch { |
27 | id: wifiSwitch |
28 | property bool serverChecked: networkActionGroup.enabled.state |
29 | - onServerCheckedChanged: checked = serverChecked |
30 | - Component.onCompleted: checked = serverChecked |
31 | - onTriggered: networkActionGroup.enabled.activate() |
32 | + |
33 | + USC.ServerPropertySynchroniser { |
34 | + userTarget: wifiSwitch |
35 | + userProperty: "checked" |
36 | + serverTarget: wifiSwitch |
37 | + serverProperty: "serverChecked" |
38 | + |
39 | + onSyncTriggered: networkActionGroup.enabled.activate() |
40 | + } |
41 | } |
42 | } |
43 | visible: networkActionGroup.enabled.state !== undefined |
44 | - Component.onCompleted: clicked.connect(wifiSwitch.clicked) |
45 | } |
46 | |
47 | QDBusActionGroup { |
48 | @@ -373,13 +379,18 @@ |
49 | sourceComponent: Switch { |
50 | id: btSwitch |
51 | property bool serverChecked: bluetoothActionGroup.enabled.state |
52 | - onServerCheckedChanged: checked = serverChecked |
53 | - Component.onCompleted: checked = serverChecked |
54 | - onTriggered: bluetoothActionGroup.enabled.activate() |
55 | + |
56 | + USC.ServerPropertySynchroniser { |
57 | + userTarget: btSwitch |
58 | + userProperty: "checked" |
59 | + serverTarget: btSwitch |
60 | + serverProperty: "serverChecked" |
61 | + |
62 | + onSyncTriggered: bluetoothActionGroup.enabled.activate() |
63 | + } |
64 | } |
65 | } |
66 | visible: bluetoothActionGroup.visible |
67 | - Component.onCompleted: clicked.connect(btSwitch.clicked) |
68 | } |
69 | |
70 | QDBusActionGroup { |
71 | @@ -401,13 +412,18 @@ |
72 | sourceComponent: Switch { |
73 | id: gpsSwitch |
74 | property bool serverChecked: locationActionGroup.enabled.state |
75 | - onServerCheckedChanged: checked = serverChecked |
76 | - Component.onCompleted: checked = serverChecked |
77 | - onTriggered: locationActionGroup.enabled.activate() |
78 | + |
79 | + USC.ServerPropertySynchroniser { |
80 | + userTarget: gpsSwitch |
81 | + userProperty: "checked" |
82 | + serverTarget: gpsSwitch |
83 | + serverProperty: "serverChecked" |
84 | + |
85 | + onSyncTriggered: locationActionGroup.enabled.activate() |
86 | + } |
87 | } |
88 | } |
89 | visible: locationActionGroup.enabled.state !== undefined |
90 | - Component.onCompleted: clicked.connect(gpsSwitch.clicked) |
91 | } |
92 | |
93 | ListItem.Caption { |
94 | |
95 | === modified file 'plugins/bluetooth/PageComponent.qml' |
96 | --- plugins/bluetooth/PageComponent.qml 2015-02-25 10:34:35 +0000 |
97 | +++ plugins/bluetooth/PageComponent.qml 2015-04-20 15:09:06 +0000 |
98 | @@ -25,6 +25,7 @@ |
99 | import Ubuntu.Components.Popups 0.1 |
100 | import Ubuntu.Components.ListItems 0.1 as ListItem |
101 | import Ubuntu.SystemSettings.Bluetooth 1.0 |
102 | +import Ubuntu.Settings.Components 0.1 as USC |
103 | |
104 | |
105 | ItemPage { |
106 | @@ -192,9 +193,14 @@ |
107 | control: Switch { |
108 | id: btSwitch |
109 | property bool serverChecked: bluetoothActionGroup.enabled.state |
110 | - onServerCheckedChanged: checked = serverChecked |
111 | - Component.onCompleted: checked = serverChecked |
112 | - onTriggered: bluetoothActionGroup.enabled.activate() |
113 | + USC.ServerPropertySynchroniser { |
114 | + userTarget: btSwitch |
115 | + userProperty: "checked" |
116 | + serverTarget: btSwitch |
117 | + serverProperty: "serverChecked" |
118 | + |
119 | + onSyncTriggered: bluetoothActionGroup.enabled.activate() |
120 | + } |
121 | } |
122 | } |
123 | |
124 | |
125 | === modified file 'plugins/brightness/PageComponent.qml' |
126 | --- plugins/brightness/PageComponent.qml 2015-03-16 13:51:36 +0000 |
127 | +++ plugins/brightness/PageComponent.qml 2015-04-20 15:09:06 +0000 |
128 | @@ -25,6 +25,7 @@ |
129 | import Ubuntu.Components.ListItems 0.1 as ListItem |
130 | import Ubuntu.SystemSettings.Brightness 1.0 |
131 | import Ubuntu.Settings.Menus 0.1 as Menus |
132 | +import Ubuntu.Settings.Components 0.1 as USC |
133 | import QMenuModel 0.1 |
134 | |
135 | ItemPage { |
136 | @@ -52,12 +53,6 @@ |
137 | Component.onCompleted: start() |
138 | } |
139 | |
140 | - Binding { |
141 | - target: sliderMenu |
142 | - property: "value" |
143 | - value: sliderMenu.enabled ? indicatorPower.action("brightness").state * 100 : 0.0 |
144 | - } |
145 | - |
146 | ListItem.Standard { |
147 | text: i18n.tr("Display brightness") |
148 | showDivider: false |
149 | @@ -67,15 +62,26 @@ |
150 | issues on valueChanged until LP: #1388094 is fixed. |
151 | */ |
152 | Menus.SliderMenu { |
153 | - id: sliderMenu |
154 | + id: brightnessSlider |
155 | objectName: "sliderMenu" |
156 | - enabled: indicatorPower.action("brightness").state != null |
157 | + enabled: indicatorPower.brightness.state != null |
158 | live: true |
159 | minimumValue: 0.0 |
160 | maximumValue: 100.0 |
161 | minIcon: "image://theme/display-brightness-min" |
162 | maxIcon: "image://theme/display-brightness-max" |
163 | - onUpdated: indicatorPower.action("brightness").updateState(value / 100.0) |
164 | + |
165 | + property real serverValue: enabled ? indicatorPower.brightness.state * 100 : 0.0 |
166 | + |
167 | + USC.ServerPropertySynchroniser { |
168 | + userTarget: brightnessSlider |
169 | + userProperty: "value" |
170 | + serverTarget: brightnessSlider |
171 | + serverProperty: "serverValue" |
172 | + maximumWaitBufferInterval: 16 |
173 | + |
174 | + onSyncTriggered: indicatorPower.brightness.updateState(value / 100.0) |
175 | + } |
176 | } |
177 | |
178 | ListItem.Standard { |
179 | |
180 | === modified file 'plugins/flight-mode/EntryComponent.qml' |
181 | --- plugins/flight-mode/EntryComponent.qml 2014-11-04 11:57:21 +0000 |
182 | +++ plugins/flight-mode/EntryComponent.qml 2015-04-20 15:09:06 +0000 |
183 | @@ -22,6 +22,7 @@ |
184 | import Ubuntu.Components 0.1 |
185 | import Ubuntu.Components.ListItems 0.1 as ListItem |
186 | import Ubuntu.SystemSettings.FlightMode 1.0 as FlightMode |
187 | +import Ubuntu.Settings.Components 0.1 as USC |
188 | |
189 | ListItem.Standard { |
190 | id: root |
191 | @@ -29,10 +30,16 @@ |
192 | iconFrame: false |
193 | text: i18n.tr(model.displayName) |
194 | control: Switch { |
195 | - property bool serverChecked: helper.inFlightMode |
196 | - onServerCheckedChanged: checked = serverChecked |
197 | - Component.onCompleted: checked = serverChecked |
198 | - onTriggered: helper.setFlightMode(checked) |
199 | + id: switchItem |
200 | + |
201 | + USC.ServerPropertySynchroniser { |
202 | + userTarget: switchItem |
203 | + userProperty: "checked" |
204 | + serverTarget: helper |
205 | + serverProperty: "inFlightMode" |
206 | + |
207 | + onSyncTriggered: helper.setFlightMode(value) |
208 | + } |
209 | } |
210 | |
211 | FlightMode.Helper { |
212 | |
213 | === modified file 'plugins/sound/PageComponent.qml' |
214 | --- plugins/sound/PageComponent.qml 2015-04-03 16:51:45 +0000 |
215 | +++ plugins/sound/PageComponent.qml 2015-04-20 15:09:06 +0000 |
216 | @@ -25,6 +25,7 @@ |
217 | import SystemSettings 1.0 |
218 | import Ubuntu.SystemSettings.Sound 1.0 |
219 | import Ubuntu.Settings.Menus 0.1 as Menus |
220 | +import Ubuntu.Settings.Components 0.1 as USC |
221 | import QMenuModel 0.1 |
222 | |
223 | import "utilities.js" as Utilities |
224 | @@ -70,9 +71,15 @@ |
225 | id: silentModeSwitch |
226 | objectName: "silentMode" |
227 | property bool serverChecked: soundActionGroup.silentMode.state |
228 | - onServerCheckedChanged: checked = serverChecked |
229 | - Component.onCompleted: checked = serverChecked |
230 | - onTriggered: soundActionGroup.silentMode.activate() |
231 | + |
232 | + USC.ServerPropertySynchroniser { |
233 | + userTarget: silentModeSwitch |
234 | + userProperty: "checked" |
235 | + serverTarget: silentModeSwitch |
236 | + serverProperty: "serverChecked" |
237 | + |
238 | + onSyncTriggered: soundActionGroup.silentMode.activate() |
239 | + } |
240 | } |
241 | text: i18n.tr("Silent Mode") |
242 | } |
243 | @@ -94,21 +101,26 @@ |
244 | Component.onCompleted: start() |
245 | } |
246 | |
247 | - Binding { |
248 | - target: sliderMenu |
249 | - property: "value" |
250 | - value: soundActionGroup.volume.state |
251 | - } |
252 | - |
253 | Menus.SliderMenu { |
254 | - id: sliderMenu |
255 | + id: volumeSlider |
256 | objectName: "sliderMenu" |
257 | enabled: soundActionGroup.volume.state != null |
258 | minimumValue: 0.0 |
259 | maximumValue: 1.0 |
260 | minIcon: "image://theme/audio-volume-low-zero" |
261 | maxIcon: "image://theme/audio-volume-high" |
262 | - onUpdated: soundActionGroup.volume.updateState(value); |
263 | + |
264 | + property real serverValue: soundActionGroup.volume.state |
265 | + |
266 | + USC.ServerPropertySynchroniser { |
267 | + userTarget: volumeSlider |
268 | + userProperty: "value" |
269 | + serverTarget: volumeSlider |
270 | + serverProperty: "serverValue" |
271 | + maximumWaitBufferInterval: 16 |
272 | + |
273 | + onSyncTriggered: soundActionGroup.volume.updateState(value); |
274 | + } |
275 | } |
276 | |
277 | ListItem.Standard { |
278 | |
279 | === modified file 'plugins/wifi/MenuItemFactory.qml' |
280 | --- plugins/wifi/MenuItemFactory.qml 2014-11-03 10:13:12 +0000 |
281 | +++ plugins/wifi/MenuItemFactory.qml 2015-04-20 15:09:06 +0000 |
282 | @@ -20,6 +20,7 @@ |
283 | import QtQuick 2.0 |
284 | import QMenuModel 0.1 as QMenuModel |
285 | import Ubuntu.Settings.Menus 0.1 as Menus |
286 | +import Ubuntu.Settings.Components 0.1 as USC |
287 | |
288 | Item { |
289 | id: menuFactory |
290 | @@ -54,6 +55,7 @@ |
291 | id: standardMenu; |
292 | StandardMenuItem { |
293 | property QtObject menu: null |
294 | + property int menuIndex: -1 |
295 | |
296 | text: menu && menu.label ? menu.label : "" |
297 | icon: menu ? menu.icon : "" |
298 | @@ -61,14 +63,16 @@ |
299 | checked: checkable ? menu.isToggled : false |
300 | enabled: menu ? menu.sensitive : false |
301 | |
302 | - onActivate: model.activate(modelIndex); |
303 | + onActivate: model.activate(menuIndex); |
304 | } |
305 | } |
306 | |
307 | Component { |
308 | id: switchMenu; |
309 | Menus.SwitchMenu { |
310 | + id: switchItem |
311 | property QtObject menu: null |
312 | + property int menuIndex: -1 |
313 | property bool serverChecked: menu && menu.isToggled || false |
314 | |
315 | text: menu && menu.label || "" |
316 | @@ -76,9 +80,14 @@ |
317 | checked: serverChecked |
318 | enabled: menu && menu.sensitive || false |
319 | |
320 | - onTriggered: model.activate(modelIndex); |
321 | - // Fixes broken check state binding. |
322 | - onServerCheckedChanged: checked = serverChecked; |
323 | + USC.ServerPropertySynchroniser { |
324 | + userTarget: switchItem |
325 | + userProperty: "checked" |
326 | + serverTarget: switchItem |
327 | + serverProperty: "serverChecked" |
328 | + |
329 | + onSyncTriggered: model.activate(switchItem.menuIndex) |
330 | + } |
331 | } |
332 | } |
333 | |
334 | @@ -86,12 +95,13 @@ |
335 | id: wifiSection; |
336 | SectionMenuItem { |
337 | property QtObject menu: null |
338 | + property int menuIndex: -1 |
339 | |
340 | text: menu && menu.label ? menu.label : "" |
341 | busy: menu ? menu.ext.xCanonicalBusyAction : false |
342 | |
343 | Component.onCompleted: { |
344 | - model.loadExtendedAttributes(modelIndex, {'x-canonical-busy-action': 'bool'}); |
345 | + model.loadExtendedAttributes(menuIndex, {'x-canonical-busy-action': 'bool'}); |
346 | } |
347 | } |
348 | } |
349 | @@ -99,7 +109,9 @@ |
350 | Component { |
351 | id: accessPoint; |
352 | AccessPoint { |
353 | + id: apItem |
354 | property QtObject menu: null |
355 | + property int menuIndex: -1 |
356 | property var strenthAction: QMenuModel.UnityMenuAction { |
357 | model: menuFactory.model ? menuFactory.model : null |
358 | name: menu ? menu.ext.xCanonicalWifiApStrengthAction : "" |
359 | @@ -114,13 +126,20 @@ |
360 | enabled: menu ? menu.sensitive : false |
361 | |
362 | Component.onCompleted: { |
363 | - model.loadExtendedAttributes(modelIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool', |
364 | - 'x-canonical-wifi-ap-is-secure': 'bool', |
365 | - 'x-canonical-wifi-ap-strength-action': 'string'}); |
366 | - } |
367 | - onActivate: model.activate(modelIndex); |
368 | - // Fixes broken check state binding. |
369 | - onServerCheckedChanged: checked = serverChecked; |
370 | + model.loadExtendedAttributes(menuIndex, {'x-canonical-wifi-ap-is-adhoc': 'bool', |
371 | + 'x-canonical-wifi-ap-is-secure': 'bool', |
372 | + 'x-canonical-wifi-ap-strength-action': 'string'}); |
373 | + } |
374 | + |
375 | + USC.ServerPropertySynchroniser { |
376 | + userTarget: apItem |
377 | + userProperty: "active" |
378 | + userTrigger: "onActivate" |
379 | + serverTarget: apItem |
380 | + serverProperty: "serverChecked" |
381 | + |
382 | + onSyncTriggered: model.activate(apItem.menuIndex) |
383 | + } |
384 | } |
385 | } |
386 | |
387 | |
388 | === modified file 'plugins/wifi/PageComponent.qml' |
389 | --- plugins/wifi/PageComponent.qml 2014-11-06 13:59:50 +0000 |
390 | +++ plugins/wifi/PageComponent.qml 2015-04-20 15:09:06 +0000 |
391 | @@ -120,6 +120,9 @@ |
392 | if (item.hasOwnProperty("menu")) { |
393 | item.menu = Qt.binding(function() { return model; }); |
394 | } |
395 | + if (item.hasOwnProperty("menuIndex")) { |
396 | + item.menuIndex = Qt.binding(function() { return modelIndex; }); |
397 | + } |
398 | } |
399 | } |
400 | } |
FAILED: Continuous integration, rev:1347 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- ci/2023/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 1859 jenkins. qa.ubuntu. com/job/ ubuntu- system- settings- vivid-i386- ci/293 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 1640 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 1857 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 1857/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 18982
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- system- settings- ci/2023/ rebuild
http://