Merge lp:~tpeeters/unity8/new_tabbar-again into lp:unity8

Proposed by Tim Peeters
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 833
Merged at revision: 870
Proposed branch: lp:~tpeeters/unity8/new_tabbar-again
Merge into: lp:unity8
Diff against target: 52 lines (+19/-11)
1 file modified
qml/Dash/DashContent.qml (+19/-11)
To merge this branch: bzr merge lp:~tpeeters/unity8/new_tabbar-again
Reviewer Review Type Date Requested Status
Tim Peeters (community) Approve
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+215658@code.launchpad.net

Commit message

Adapt to new TabBar

Description of the change

Re-do the changes (r820) to move the selectedIndex from the TabBar to the tabs model.

* Are there any related MPs required for this MP to build/function as expected?
https://code.launchpad.net/~tpeeters/ubuntu-ui-toolkit/10-tabsModelIndex/+merge/215278

* Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

* Did you make sure that your branch does not contain spurious tags?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

* If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:833
http://jenkins.qa.ubuntu.com/job/unity8-ci/2810/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/228
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4820
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1674
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1331
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1335
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1335/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1331
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/215
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4397
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4397/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6000
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4165
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4952
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4952/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2810/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass?
No, otto keeps being sad and broken

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

I ran UITK and unity8 tests locally on mako with image 294:

http://paste.ubuntu.com/7254918/

UITK and unity8 tests pass. There are some failures in system-settings, same as here http://ci.ubuntu.com/smokeng/trusty/touch/mako/290:20140411.3:20140411.3/7698/ubuntu_system_settings/ I guess I have some older packages version or the tests are flaky?

review: Approve
lp:~tpeeters/unity8/new_tabbar-again updated
834. By Tim Peeters

merge trunk

835. By Tim Peeters

merge trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Dash/DashContent.qml'
2--- qml/Dash/DashContent.qml 2014-04-14 13:21:55 +0000
3+++ qml/Dash/DashContent.qml 2014-05-02 15:19:11 +0000
4@@ -17,6 +17,7 @@
5 import QtQuick 2.0
6 import Ubuntu.Components 0.1
7 import Unity 0.2
8+import Utils 0.1
9 import "../Components"
10
11 Item {
12@@ -183,23 +184,30 @@
13 width: parent.width
14 style: DashContentTabBarStyle {}
15
16- model: dashContentList.model
17-
18- onSelectedIndexChanged: {
19- if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
20- // TODO This together with the Timer below
21- // are a workaround for the first tab sometimes not showing the text.
22- // But Tabs are going away in the future so not sure if makes
23- // sense invetigating what's the problem at this stage
24- selectionModeTimer.restart();
25+ SortFilterProxyModel {
26+ id: tabBarModel
27+
28+ model: dashContentList.model
29+
30+ property int selectedIndex: -1
31+ onSelectedIndexChanged: {
32+ if (dashContentList.currentIndex == -1 && tabBar.selectedIndex != -1) {
33+ // TODO This together with the Timer below
34+ // are a workaround for the first tab sometimes not showing the text.
35+ // But Tabs are going away in the future so not sure if makes
36+ // sense invetigating what's the problem at this stage
37+ selectionModeTimer.restart();
38+ }
39+ dashContentList.currentIndex = selectedIndex;
40 }
41- dashContentList.currentIndex = selectedIndex;
42 }
43
44+ model: tabBarModel.count > 0 ? tabBarModel : null
45+
46 Connections {
47 target: dashContentList
48 onCurrentIndexChanged: {
49- tabBar.selectedIndex = dashContentList.currentIndex
50+ tabBarModel.selectedIndex = dashContentList.currentIndex
51 }
52 }
53

Subscribers

People subscribed via source and target branches