Merge lp:~tpeeters/ubuntu-ui-toolkit/qt56fixes3oldtoolbar into lp:ubuntu-ui-toolkit/staging

Proposed by Tim Peeters
Status: Merged
Approved by: Cris Dywan
Approved revision: 2130
Merged at revision: 2131
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/qt56fixes3oldtoolbar
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 27 lines (+2/-2)
2 files modified
src/imports/Components/Themes/Ambiance/1.2/TabBarStyle.qml (+1/-1)
src/imports/Components/Themes/Ambiance/1.3/TabBarStyle.qml (+1/-1)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/qt56fixes3oldtoolbar
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+306861@code.launchpad.net

Commit message

Ensure that the model in TabBarStyle is a list and not null.

Description of the change

Ensure that the model in TabBarStyle is a list and not null.

To post a comment you must log in.
Revision history for this message
Andrea Bernabei (faenil) wrote :

it looks ok to me, but why wasn't it needed before? and why is the model null even after the style has been initialized?

Revision history for this message
Tim Peeters (tpeeters) wrote :

The model is null because styledItem.model is null. The test does not set a value for the model, and the default from TabBar.qml is null.

Revision history for this message
Cris Dywan (kalikiana) wrote :

That change is sensible to my mind: using a null model with Repeater doesn't particularly make sense, as opposed to [] or 0, and likely the code got stricter type-checking so it no longer happens to work that way.

And I second leaving the API as-is, since it's an already deprecated component. We should just keep it in mind for future components.

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/Components/Themes/Ambiance/1.2/TabBarStyle.qml'
2--- src/imports/Components/Themes/Ambiance/1.2/TabBarStyle.qml 2015-04-24 14:52:19 +0000
3+++ src/imports/Components/Themes/Ambiance/1.2/TabBarStyle.qml 2016-09-27 12:12:19 +0000
4@@ -62,7 +62,7 @@
5 buttonView.selectButton(styledItem.model.selectedIndex);
6 }
7
8- property var tabsModel : styledItem ? styledItem.model : null
9+ property var tabsModel : styledItem && styledItem.model ? styledItem.model : []
10
11 Connections {
12 target: styledItem
13
14=== modified file 'src/imports/Components/Themes/Ambiance/1.3/TabBarStyle.qml'
15--- src/imports/Components/Themes/Ambiance/1.3/TabBarStyle.qml 2015-09-21 14:44:13 +0000
16+++ src/imports/Components/Themes/Ambiance/1.3/TabBarStyle.qml 2016-09-27 12:12:19 +0000
17@@ -62,7 +62,7 @@
18 buttonView.selectButton(styledItem.model.selectedIndex);
19 }
20
21- property var tabsModel : styledItem ? styledItem.model : null
22+ property var tabsModel : styledItem && styledItem.model ? styledItem.model : []
23
24 Connections {
25 target: styledItem
26
27=== renamed file 'tests/unit/components/FIXME-QT56_pagestack_deprecated_toolbar.qml' => 'tests/unit/components/tst_pagestack.DEPRECATED_TOOLBAR.11.qml'

Subscribers

People subscribed via source and target branches