Merge lp:~aacid/unity8/noModelInSignal into lp:unity8

Proposed by Albert Astals Cid on 2013-11-11
Status: Merged
Approved by: Francis Ginther on 2013-11-17
Approved revision: 520
Merged at revision: 526
Proposed branch: lp:~aacid/unity8/noModelInSignal
Merge into: lp:unity8
Diff against target: 202 lines (+24/-26)
8 files modified
Components/Carousel.qml (+4/-6)
Dash/Apps/ApplicationsFilterGrid.qml (+4/-4)
Dash/Apps/DashPluginFilterGrid.qml (+2/-2)
Dash/Generic/GenericFilterGrid.qml (+4/-4)
Dash/Generic/WeatherFilterGrid.qml (+2/-2)
Dash/GenericScopeView.qml (+4/-4)
Dash/Music/MusicFilterGrid.qml (+2/-2)
Dash/Video/VideoFilterGrid.qml (+2/-2)
To merge this branch: bzr merge lp:~aacid/unity8/noModelInSignal
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve on 2013-11-18
Nick Dedekind (community) 2013-11-11 Approve on 2013-11-11
Review via email: mp+194672@code.launchpad.net

Commit message

Dash renderer signals: No need to pass the model up and down

Whoever is listening to the signal has access to the item that emits the signal and has the model right there accessible if needs it

To post a comment you must log in.
Nick Dedekind (nick-dedekind) wrote :

Makes sense.

review: Approve
Nick Dedekind (nick-dedekind) wrote :

Single line commit message.
Can put rest in description?

review: Needs Fixing
Nick Dedekind (nick-dedekind) wrote :

Nevermind.

review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/683/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/generic-cleanup-mbs/3207/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/712
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/698/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/230
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/69
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/69/console
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/69/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/69
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/648
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/712
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/712/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/698
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/698/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3328/console
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1417

review: Needs Fixing (continuous-integration)
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:520
http://jenkins.qa.ubuntu.com/job/unity8-ci/1636/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/717
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/703/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/233
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/159
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/160
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/160/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/159
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/652
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/717
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/717/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/703
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/703/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3334/console
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1423

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

review: Needs Fixing (continuous-integration)
Francis Ginther (fginther) wrote :

Re-approving after resolving jenkins config error for generic-mediumtests-runner-mako job.

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:520
http://jenkins.qa.ubuntu.com/job/unity8-ci/1649/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/740
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/728/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/251
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/173
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/173/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/675
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/740
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/740/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/728
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/728/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3357/console
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1446

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

review: Needs Fixing (continuous-integration)
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Components/Carousel.qml'
2--- Components/Carousel.qml 2013-11-04 17:26:09 +0000
3+++ Components/Carousel.qml 2013-11-11 11:47:12 +0000
4@@ -54,15 +54,13 @@
5
6 /// Emitted when the user clicked on an item
7 /// @param index is the index of the clicked item
8- /// @param model is the model of all the items in the carousel
9 /// @param itemY is y of the clicked delegate
10- signal clicked(int index, var model, real itemY)
11+ signal clicked(int index, real itemY)
12
13 /// Emitted when the user pressed and held on an item
14 /// @param index is the index of the held item
15- /// @param model is the model of all the items in the carousel
16 /// @param itemY is y of the held delegate
17- signal pressAndHold(int index, var model, real itemY)
18+ signal pressAndHold(int index, real itemY)
19
20 implicitHeight: listView.tileHeight * selectedItemScaleFactor
21
22@@ -163,7 +161,7 @@
23 /* We're clicking the selected item and
24 we're in the neighbourhood of radius 1 pixel from it.
25 Let's emit the clicked signal. */
26- carousel.clicked(index, listView.model, delegateItem.y)
27+ carousel.clicked(index, delegateItem.y)
28 return
29 }
30
31@@ -187,7 +185,7 @@
32 /* We're pressAndHold the selected item and
33 we're in the neighbourhood of radius 1 pixel from it.
34 Let's emit the pressAndHold signal. */
35- carousel.pressAndHold(index, listView.model, delegateItem.y);
36+ carousel.pressAndHold(index, delegateItem.y);
37 return;
38 }
39
40
41=== modified file 'Dash/Apps/ApplicationsFilterGrid.qml'
42--- Dash/Apps/ApplicationsFilterGrid.qml 2013-10-07 11:29:16 +0000
43+++ Dash/Apps/ApplicationsFilterGrid.qml 2013-11-11 11:47:12 +0000
44@@ -28,8 +28,8 @@
45 delegateHeight: units.gu(9.5)
46 verticalSpacing: units.gu(2)
47
48- signal clicked(int index, var model, real itemY)
49- signal pressAndHold(int index, var model, real itemY)
50+ signal clicked(int index, real itemY)
51+ signal pressAndHold(int index, real itemY)
52
53 delegate: Tile {
54 id: tile
55@@ -54,11 +54,11 @@
56 source: icon
57
58 onClicked: {
59- filtergrid.clicked(index, filtergrid.model, tile.y)
60+ filtergrid.clicked(index, tile.y)
61 }
62
63 onPressAndHold: {
64- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
65+ filtergrid.pressAndHold(index, tile.y)
66 }
67 }
68 }
69
70=== modified file 'Dash/Apps/DashPluginFilterGrid.qml'
71--- Dash/Apps/DashPluginFilterGrid.qml 2013-10-14 10:43:49 +0000
72+++ Dash/Apps/DashPluginFilterGrid.qml 2013-11-11 11:47:12 +0000
73@@ -37,11 +37,11 @@
74 }
75
76 onClicked: {
77- filtergrid.clicked(index, filtergrid.model, tile.y)
78+ filtergrid.clicked(index, tile.y)
79 }
80
81 onPressAndHold: {
82- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
83+ filtergrid.pressAndHold(index, tile.y)
84 }
85 }
86 }
87
88=== modified file 'Dash/Generic/GenericFilterGrid.qml'
89--- Dash/Generic/GenericFilterGrid.qml 2013-10-14 10:43:49 +0000
90+++ Dash/Generic/GenericFilterGrid.qml 2013-11-11 11:47:12 +0000
91@@ -28,8 +28,8 @@
92 property int iconWidth: units.gu(8)
93 property int iconHeight: units.gu(7.5)
94
95- signal clicked(int index, var model, real itemY)
96- signal pressAndHold(int index, var model, real itemY)
97+ signal clicked(int index, real itemY)
98+ signal pressAndHold(int index, real itemY)
99
100 delegate: Tile {
101 id: tile
102@@ -42,11 +42,11 @@
103 source: model.icon
104
105 onClicked: {
106- filtergrid.clicked(index, filtergrid.model, tile.y)
107+ filtergrid.clicked(index, tile.y)
108 }
109
110 onPressAndHold: {
111- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
112+ filtergrid.pressAndHold(index, tile.y)
113 }
114 }
115 }
116
117=== modified file 'Dash/Generic/WeatherFilterGrid.qml'
118--- Dash/Generic/WeatherFilterGrid.qml 2013-10-14 10:43:49 +0000
119+++ Dash/Generic/WeatherFilterGrid.qml 2013-11-11 11:47:12 +0000
120@@ -37,11 +37,11 @@
121 style: FlatTileStyle {}
122
123 onClicked: {
124- filtergrid.clicked(index, filtergrid.model, tile.y)
125+ filtergrid.clicked(index, tile.y)
126 }
127
128 onPressAndHold: {
129- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
130+ filtergrid.pressAndHold(index, tile.y)
131 }
132 }
133 }
134
135=== modified file 'Dash/GenericScopeView.qml'
136--- Dash/GenericScopeView.qml 2013-11-08 03:10:09 +0000
137+++ Dash/GenericScopeView.qml 2013-11-11 11:47:12 +0000
138@@ -133,11 +133,11 @@
139 effect.positionPx = mapToItem(categoryView, 0, itemY).y
140 previewListView.categoryId = categoryId
141 previewListView.categoryDelegate = rendererLoader.item
142- previewListView.model = model;
143+ previewListView.model = target.model;
144 previewListView.init = true;
145 previewListView.currentIndex = index;
146
147- var item = model.get(index);
148+ var item = target.model.get(index);
149
150 if ((scopeView.scope.id == "applications.scope" && categoryId == "installed")
151 || (scopeView.scope.id == "home.scope" && categoryId == "applications.scope")) {
152@@ -154,12 +154,12 @@
153 effect.positionPx = mapToItem(categoryView, 0, itemY).y
154 previewListView.categoryId = categoryId
155 previewListView.categoryDelegate = rendererLoader.item
156- previewListView.model = model;
157+ previewListView.model = target.model;
158 previewListView.init = true;
159 previewListView.currentIndex = index;
160 previewListView.open = true
161
162- var item = model.get(index)
163+ var item = target.model.get(index)
164 scopeView.scope.preview( item.uri, item.icon, item.category, 0, item.mimetype, item.title,
165 item.comment, item.dndUri, item.metadata)
166 }
167
168=== modified file 'Dash/Music/MusicFilterGrid.qml'
169--- Dash/Music/MusicFilterGrid.qml 2013-10-14 10:43:49 +0000
170+++ Dash/Music/MusicFilterGrid.qml 2013-11-11 11:47:12 +0000
171@@ -44,11 +44,11 @@
172 }
173
174 onClicked: {
175- filtergrid.clicked(index, filtergrid.model, tile.y)
176+ filtergrid.clicked(index, tile.y)
177 }
178
179 onPressAndHold: {
180- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
181+ filtergrid.pressAndHold(index, tile.y)
182 }
183 }
184 }
185
186=== modified file 'Dash/Video/VideoFilterGrid.qml'
187--- Dash/Video/VideoFilterGrid.qml 2013-10-14 10:43:49 +0000
188+++ Dash/Video/VideoFilterGrid.qml 2013-11-11 11:47:12 +0000
189@@ -42,11 +42,11 @@
190 style: VideoTileStyle {}
191
192 onClicked: {
193- filtergrid.clicked(index, filtergrid.model, tile.y)
194+ filtergrid.clicked(index, tile.y)
195 }
196
197 onPressAndHold: {
198- filtergrid.pressAndHold(index, filtergrid.model, tile.y)
199+ filtergrid.pressAndHold(index, tile.y)
200 }
201 }
202 }

Subscribers

People subscribed via source and target branches