Merge lp://qastaging/~nick-dedekind/ubuntu-system-settings/lp1336715.check.sync into lp://qastaging/ubuntu-system-settings

Proposed by Nick Dedekind
Status: Merged
Approved by: Ken VanDine
Approved revision: 1160
Merged at revision: 1188
Proposed branch: lp://qastaging/~nick-dedekind/ubuntu-system-settings/lp1336715.check.sync
Merge into: lp://qastaging/ubuntu-system-settings
Diff against target: 682 lines (+167/-138)
15 files modified
plugins/battery/PageComponent.qml (+14/-25)
plugins/bluetooth/PageComponent.qml (+9/-15)
plugins/brightness/PageComponent.qml (+4/-9)
plugins/cellular/Components/DataMultiSim.qml (+9/-7)
plugins/cellular/Components/SingleSim.qml (+13/-7)
plugins/flight-mode/EntryComponent.qml (+3/-3)
plugins/language/PageComponent.qml (+28/-21)
plugins/language/SpellChecking.qml (+12/-3)
plugins/orientation-lock/EntryComponent.qml (+6/-4)
plugins/phone/PageComponent.qml (+4/-2)
plugins/security-privacy/PageComponent.qml (+8/-14)
plugins/security-privacy/PhoneLocking.qml (+10/-4)
plugins/sound/PageComponent.qml (+28/-15)
plugins/sound/sound.cpp (+3/-0)
plugins/wifi/MenuItemFactory.qml (+16/-9)
To merge this branch: bzr merge lp://qastaging/~nick-dedekind/ubuntu-system-settings/lp1336715.check.sync
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Sebastien Bacher (community) Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+239494@code.qastaging.launchpad.net

Commit message

Fixed switches & check-boxes going out of sync with backends.

Description of the change

Fixed switches & check-boxes going out of sync with backends.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks. That seems to change more than what the description says though (it has dialpad sound changes and wifi ui cleanings, those should probably be submitted as different changesets)

Could you also give some background informations on why we need a special Switch widget. Could the toolkit be updated/fixed in a way that would let us use the standard component (if the answer is yes, then we should open a bug report about that at least)

review: Needs Fixing
1155. By Nick Dedekind

bump usc requirement

1156. By Nick Dedekind

removed unnecessary change

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Thanks. That seems to change more than what the description says though (it
> has dialpad sound changes and wifi ui cleanings, those should probably be
> submitted as different changesets)

Pushed the wifi ui cleanup to the wrong branch by mistake; they are already in a different branch.
I changed the wifi switch to use the usc component because there were problems with the switch menu that were fixed in usc.
The dialpad sound changes I'm not seeing (other than fixing the sync issue).

>
> Could you also give some background informations on why we need a special
> Switch widget. Could the toolkit be updated/fixed in a way that would let us
> use the standard component (if the answer is yes, then we should open a bug
> report about that at least)

The problem is not an issue with the sdk. It's how we use it with qml. We are assuming that we can just bind the 'check' property to another property value and everything will be fine.
If we want to do it without a special component which handles the broken binding, we have to do something like:

Switch {
   property bool serverChecked: settings.spellChecking
   onServerCheckedChanged: check = serverChecked
   Component.onCompleted: check = serverChecked
   onClicked: settings.spellChecking = checked
}

for every use; which in retrospect doesn't look horrific as I though. Let me know if you'd rather have it this way and I'll make the change.

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

Thanks, I don't have a strong preference on the component choice, though it seems nicer to use the uitk widget if possible (less external depends, code easier to understand for people who don't know the settings components)

the change look fine on principle to me, some extra questions/comments:

- is ubuntu-settings-component 0.5 lined up for landing yet? (what changed in that version that you require it)

- why do you use "Component.onCompleted: clicked.connect" in some cases and not others?

- you have merge conflicts, those should be resolved

review: Needs Fixing
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Thanks, I don't have a strong preference on the component choice, though it
> seems nicer to use the uitk widget if possible (less external depends, code
> easier to understand for people who don't know the settings components)

I might change to use the uitk without using bindings then. Just need to ensure that i've covered all the bases.

>
> the change look fine on principle to me, some extra questions/comments:
>
> - is ubuntu-settings-component 0.5 lined up for landing yet? (what changed in
> that version that you require it)

https://code.launchpad.net/~nick-dedekind/ubuntu-settings-components/lp1336715.check.sync/+merge/239491

Added the SyncCheckBox which is currently a requirement for this branch. If I remove it and use the base sdk component, I'll remove the version requirement.

>
> - why do you use "Component.onCompleted: clicked.connect" in some cases and
> not others?

If a Loader is used, then we need to connect the click of the list item to the loader item (since the ListItem.control is getting the click, rather than the Loader.item.

>
> - you have merge conflicts, those should be resolved

Will do.

1157. By Nick Dedekind

dont use USC.SyncSwitch

1158. By Nick Dedekind

reverted unnecessary changes

1159. By Nick Dedekind

merged with trunk

1160. By Nick Dedekind

more fixes

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> Thanks, I don't have a strong preference on the component choice, though it
> seems nicer to use the uitk widget if possible (less external depends, code
> easier to understand for people who don't know the settings components)
>

I've removed the extra component. Doesn't require any new components now; just fixes for existing Switches/CheckBoxes.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

I'd REALLY like to add tests for all the switches/checks.
But will be a bit of an undertaking...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

You have some spacing changes in SingleSim, could you revert those? Otherwise looks good, approving once those are resolved

review: Needs Fixing
Revision history for this message
Ken VanDine (ken-vandine) wrote :
review: Approve
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches