Merge lp:~aacid/unity8/noScopeView into lp:unity8
- noScopeView
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 516 |
Merged at revision: | 533 |
Proposed branch: | lp:~aacid/unity8/noScopeView |
Merge into: | lp:unity8 |
Diff against target: |
382 lines (+81/-192) 8 files modified
Dash/GenericScopeView.qml (+47/-2) Dash/ScopeView.qml (+0/-65) tests/qmltests/CMakeLists.txt (+0/-1) tests/qmltests/Dash/qml/FakeScopeView.qml (+3/-69) tests/qmltests/Dash/tst_DashContent.qml (+22/-3) tests/qmltests/Dash/tst_GenericScopeView.qml (+7/-0) tests/qmltests/Dash/tst_ScopeView.qml (+0/-52) tests/utils/modules/Unity/Test/UnityTestCase.qml (+2/-0) |
To merge this branch: | bzr merge lp:~aacid/unity8/noScopeView |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Nick Dedekind (community) | Approve | ||
Review via email: mp+194486@code.launchpad.net |
Commit message
Unify ScopeView and GenericScopeView
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:513
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
Can't repro the error here, try again just in case it's not an unrelated failure
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Michał Sawicz (saviq) wrote : | # |
Failed tests:
qmltestrunn
qmltestrunn
qmltestrunn
qmltestrunn
qmltestrunn
qmltestrunn
qmltestrunn
qmltestrunn
Nick Dedekind (nick-dedekind) wrote : | # |
I'm getting a segfault in testDashContent
Albert Astals Cid (aacid) wrote : | # |
Right
Nick Dedekind (nick-dedekind) wrote : | # |
OK. Not the ideal solution to make the test pass, but it'll do until 5.2
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
PS Jenkins bot (ps-jenkins) : | # |
Preview Diff
1 | === modified file 'Dash/GenericScopeView.qml' |
2 | --- Dash/GenericScopeView.qml 2013-11-08 03:10:09 +0000 |
3 | +++ Dash/GenericScopeView.qml 2013-11-14 15:12:49 +0000 |
4 | @@ -16,15 +16,60 @@ |
5 | |
6 | import QtQuick 2.0 |
7 | import Ubuntu.Components 0.1 |
8 | +import Utils 0.1 |
9 | +import Unity 0.1 |
10 | import "../Components" |
11 | import "../Components/ListItems" as ListItems |
12 | |
13 | -ScopeView { |
14 | +FocusScope { |
15 | id: scopeView |
16 | + |
17 | + property Scope scope |
18 | + property SortFilterProxyModel categories: categoryFilter |
19 | + property bool isCurrent |
20 | + property ListModel searchHistory |
21 | + property alias moving: categoryView.moving |
22 | + |
23 | + signal endReached |
24 | + signal movementStarted |
25 | + signal positionedAtBeginning |
26 | + |
27 | readonly property alias previewShown: previewListView.onScreen |
28 | property bool enableHeightBehaviorOnNextCreation: false |
29 | |
30 | - moving: categoryView.moving |
31 | + // FIXME delay the search so that daemons have time to settle, note that |
32 | + // removing this will break ScopeView::test_changeScope |
33 | + onScopeChanged: { |
34 | + if (scope) { |
35 | + timer.restart(); |
36 | + scope.activateApplication.connect(activateApp); |
37 | + } |
38 | + } |
39 | + |
40 | + function activateApp(desktopFilePath) { |
41 | + shell.activateApplication(desktopFilePath); |
42 | + } |
43 | + |
44 | + Binding { |
45 | + target: scope |
46 | + property: "isActive" |
47 | + value: isCurrent |
48 | + } |
49 | + |
50 | + Timer { |
51 | + id: timer |
52 | + interval: 2000 |
53 | + onTriggered: scope.searchQuery = "" |
54 | + } |
55 | + |
56 | + SortFilterProxyModel { |
57 | + id: categoryFilter |
58 | + model: scope ? scope.categories : null |
59 | + dynamicSortFilter: true |
60 | + filterRole: Categories.RoleCount |
61 | + filterRegExp: /^0$/ |
62 | + invertMatch: true |
63 | + } |
64 | |
65 | onIsCurrentChanged: { |
66 | pageHeader.resetSearch(); |
67 | |
68 | === removed file 'Dash/ScopeView.qml' |
69 | --- Dash/ScopeView.qml 2013-10-11 10:07:25 +0000 |
70 | +++ Dash/ScopeView.qml 1970-01-01 00:00:00 +0000 |
71 | @@ -1,65 +0,0 @@ |
72 | -/* |
73 | - * Copyright (C) 2013 Canonical, Ltd. |
74 | - * |
75 | - * This program is free software; you can redistribute it and/or modify |
76 | - * it under the terms of the GNU General Public License as published by |
77 | - * the Free Software Foundation; version 3. |
78 | - * |
79 | - * This program is distributed in the hope that it will be useful, |
80 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
81 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
82 | - * GNU General Public License for more details. |
83 | - * |
84 | - * You should have received a copy of the GNU General Public License |
85 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
86 | - */ |
87 | - |
88 | -import QtQuick 2.0 |
89 | -import Utils 0.1 |
90 | -import Unity 0.1 |
91 | - |
92 | -FocusScope { |
93 | - property Scope scope |
94 | - property SortFilterProxyModel categories: categoryFilter |
95 | - property bool isCurrent |
96 | - property ListModel searchHistory |
97 | - property bool moving: false |
98 | - |
99 | - signal endReached |
100 | - signal movementStarted |
101 | - signal positionedAtBeginning |
102 | - |
103 | - // FIXME delay the search so that daemons have time to settle, note that |
104 | - // removing this will break ScopeView::test_changeScope |
105 | - onScopeChanged: { |
106 | - if (scope) { |
107 | - timer.restart(); |
108 | - scope.activateApplication.connect(activateApp); |
109 | - } |
110 | - } |
111 | - |
112 | - function activateApp(desktopFilePath) { |
113 | - shell.activateApplication(desktopFilePath); |
114 | - } |
115 | - |
116 | - Binding { |
117 | - target: scope |
118 | - property: "isActive" |
119 | - value: isCurrent |
120 | - } |
121 | - |
122 | - Timer { |
123 | - id: timer |
124 | - interval: 2000 |
125 | - onTriggered: scope.searchQuery = "" |
126 | - } |
127 | - |
128 | - SortFilterProxyModel { |
129 | - id: categoryFilter |
130 | - model: scope ? scope.categories : null |
131 | - dynamicSortFilter: true |
132 | - filterRole: Categories.RoleCount |
133 | - filterRegExp: /^0$/ |
134 | - invertMatch: true |
135 | - } |
136 | -} |
137 | |
138 | === modified file 'tests/qmltests/CMakeLists.txt' |
139 | --- tests/qmltests/CMakeLists.txt 2013-11-08 19:56:54 +0000 |
140 | +++ tests/qmltests/CMakeLists.txt 2013-11-14 15:12:49 +0000 |
141 | @@ -45,7 +45,6 @@ |
142 | add_qml_test(Dash DashPreview) |
143 | add_qml_test(Dash GenericPreview) |
144 | add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}) |
145 | -add_qml_test(Dash ScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}) |
146 | add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins |
147 | ${CMAKE_BINARY_DIR}/tests/mocks) |
148 | add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks) |
149 | |
150 | === modified file 'tests/qmltests/Dash/qml/FakeScopeView.qml' |
151 | --- tests/qmltests/Dash/qml/FakeScopeView.qml 2013-10-31 10:41:10 +0000 |
152 | +++ tests/qmltests/Dash/qml/FakeScopeView.qml 2013-11-14 15:12:49 +0000 |
153 | @@ -19,14 +19,13 @@ |
154 | |
155 | import "../../../../Dash" |
156 | |
157 | -ScopeView { |
158 | +GenericScopeView { |
159 | id: fakeScopeView |
160 | |
161 | property alias backColor : back.color |
162 | - moving: listView.moving |
163 | |
164 | onEndReached: { |
165 | - if (shell != undefined && shell.scopeStatus != undefined) { |
166 | + if (scope != undefined && shell != undefined && shell.scopeStatus != undefined) { |
167 | shell.scopeStatus[scope.id].endReached++; |
168 | } |
169 | } |
170 | @@ -45,71 +44,6 @@ |
171 | id: back |
172 | anchors.fill: parent |
173 | color: "grey" |
174 | - } |
175 | - |
176 | - function randomBg() |
177 | - { |
178 | - var hex1=new Array("4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F") |
179 | - var bg="#"+hex1[Math.floor(Math.random()*hex1.length)]+ |
180 | - hex1[Math.floor(Math.random()*hex1.length)]+ |
181 | - hex1[Math.floor(Math.random()*hex1.length)]+ |
182 | - hex1[Math.floor(Math.random()*hex1.length)]+ |
183 | - hex1[Math.floor(Math.random()*hex1.length)]+ |
184 | - hex1[Math.floor(Math.random()*hex1.length)] |
185 | - return bg |
186 | - } |
187 | - |
188 | - |
189 | - ListView { |
190 | - id: listView |
191 | - anchors.fill: parent |
192 | - model: scope ? scope.categories : null |
193 | - orientation: ListView.Vertical |
194 | - |
195 | - delegate: Column { |
196 | - id: column |
197 | - width: listView.width |
198 | - height: childrenRect.height |
199 | - |
200 | - Rectangle { |
201 | - width: listView.width |
202 | - height: units.gu(3) |
203 | - color: randomBg() |
204 | - |
205 | - Text { |
206 | - text: name |
207 | - font.family: "Ubuntu" |
208 | - font.weight: Font.Bold |
209 | - font.pixelSize: 20 |
210 | - anchors.horizontalCenter: parent.horizontalCenter |
211 | - } |
212 | - } |
213 | - GridView { |
214 | - id: resultsGrid |
215 | - model: results |
216 | - cellWidth: units.gu(10); cellHeight: units.gu(10) |
217 | - height: childrenRect.height |
218 | - width: listView.width |
219 | - interactive: false |
220 | - |
221 | - delegate: Component { |
222 | - id: resultDelegate |
223 | - Item { |
224 | - width: resultsGrid.cellWidth; height: resultsGrid.cellHeight |
225 | - Column { |
226 | - anchors.verticalCenter: parent.verticalCenter |
227 | - anchors.horizontalCenter: parent.horizontalCenter |
228 | - Image { |
229 | - width: units.gu(5) |
230 | - height: units.gu(5) |
231 | - source: icon |
232 | - anchors.horizontalCenter: parent.horizontalCenter |
233 | - } |
234 | - Text { text: title; anchors.horizontalCenter: parent.horizontalCenter } |
235 | - } |
236 | - } |
237 | - } |
238 | - } |
239 | - } |
240 | + z: -1 |
241 | } |
242 | } |
243 | |
244 | === modified file 'tests/qmltests/Dash/tst_DashContent.qml' |
245 | --- tests/qmltests/Dash/tst_DashContent.qml 2013-10-31 10:41:10 +0000 |
246 | +++ tests/qmltests/Dash/tst_DashContent.qml 2013-11-14 15:12:49 +0000 |
247 | @@ -28,6 +28,18 @@ |
248 | |
249 | property ListModel searchHistory: ListModel {} |
250 | |
251 | + Item { |
252 | + // Fake. Make a few components less noisy |
253 | + id: greeter |
254 | + signal shownChanged |
255 | + } |
256 | + |
257 | + Item { |
258 | + // Fake. Make a few components less noisy |
259 | + id: panel |
260 | + signal searchClicked |
261 | + } |
262 | + |
263 | property var scopeStatus: { |
264 | 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 }, |
265 | 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 }, |
266 | @@ -111,10 +123,17 @@ |
267 | clear_scope_status(); |
268 | dashContent.visible = true; |
269 | |
270 | + var dashContentList = findChild(dashContent, "dashContentList"); |
271 | + verify(dashContentList != undefined); |
272 | + // TODO For Qt 5.2 remove this wait |
273 | + // and the tryCompare and see if it still crashes when |
274 | + // looping the test |
275 | + wait(1000); |
276 | + if (dashContentList.currentItem !== null) { |
277 | + tryCompare(dashContentList.currentItem, "moving", false); |
278 | + } |
279 | scopesModel.clear(); |
280 | // wait for dash to empty scopes. |
281 | - var dashContentList = findChild(dashContent, "dashContentList"); |
282 | - verify(dashContentList != undefined); |
283 | tryCompare(dashContentList, "count", 0); |
284 | } |
285 | |
286 | @@ -237,7 +256,7 @@ |
287 | |
288 | var startX = dashContentList.width/2; |
289 | var startY = dashContentList.height/2; |
290 | - touchFlick(dashContentList, startX, startY, startX, startY - units.gu(800)); |
291 | + touchFlick(dashContentList, startX, startY, startX, startY - units.gu(80)); |
292 | |
293 | tryCompare(dashContentList.currentItem, "moving", true); |
294 | |
295 | |
296 | === modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml' |
297 | --- tests/qmltests/Dash/tst_GenericScopeView.qml 2013-11-07 16:28:38 +0000 |
298 | +++ tests/qmltests/Dash/tst_GenericScopeView.qml 2013-11-14 15:12:49 +0000 |
299 | @@ -190,6 +190,13 @@ |
300 | |
301 | closePreview(); |
302 | } |
303 | + |
304 | + function test_changeScope() { |
305 | + genericScopeView.scope.searchQuery = "test" |
306 | + genericScopeView.scope = scopes.get(1) |
307 | + genericScopeView.scope = scopes.get(0) |
308 | + tryCompare(genericScopeView.scope, "searchQuery", "") |
309 | + } |
310 | } |
311 | } |
312 | } |
313 | |
314 | === removed file 'tests/qmltests/Dash/tst_ScopeView.qml' |
315 | --- tests/qmltests/Dash/tst_ScopeView.qml 2013-06-13 09:27:02 +0000 |
316 | +++ tests/qmltests/Dash/tst_ScopeView.qml 1970-01-01 00:00:00 +0000 |
317 | @@ -1,52 +0,0 @@ |
318 | -/* |
319 | - * Copyright 2013 Canonical Ltd. |
320 | - * |
321 | - * This program is free software; you can redistribute it and/or modify |
322 | - * it under the terms of the GNU General Public License as published by |
323 | - * the Free Software Foundation; version 3. |
324 | - * |
325 | - * This program is distributed in the hope that it will be useful, |
326 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
327 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
328 | - * GNU General Public License for more details. |
329 | - * |
330 | - * You should have received a copy of the GNU General Public License |
331 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
332 | - */ |
333 | - |
334 | -import QtQuick 2.0 |
335 | -import QtTest 1.0 |
336 | -import Unity 0.1 |
337 | -import ".." |
338 | -import "../../../Dash" |
339 | -import Ubuntu.Components 0.1 |
340 | - |
341 | -Item { |
342 | - width: units.gu(120) |
343 | - height: units.gu(80) |
344 | - |
345 | - Scopes { |
346 | - id: scopes |
347 | - } |
348 | - |
349 | - ScopeView { |
350 | - id: scopeView |
351 | - anchors.fill: parent |
352 | - |
353 | - TestCase { |
354 | - name: "ScopeView" |
355 | - when: scopes.loaded |
356 | - |
357 | - function init() { |
358 | - scopeView.scope = scopes.get(0) |
359 | - } |
360 | - |
361 | - function test_changeScope() { |
362 | - scopeView.scope.searchQuery = "test" |
363 | - scopeView.scope = scopes.get(1) |
364 | - scopeView.scope = scopes.get(0) |
365 | - tryCompare(scopeView.scope, "searchQuery", "") |
366 | - } |
367 | - } |
368 | - } |
369 | -} |
370 | |
371 | === modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml' |
372 | --- tests/utils/modules/Unity/Test/UnityTestCase.qml 2013-11-05 10:18:43 +0000 |
373 | +++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2013-11-14 15:12:49 +0000 |
374 | @@ -214,6 +214,8 @@ |
375 | |
376 | // speed is in pixels/second |
377 | function touchFlick(item, x, y, toX, toY, beginTouch, endTouch, speed, iterations) { |
378 | + // Make sure the item is rendered |
379 | + waitForRendering(item); |
380 | |
381 | // Default to true for beginTouch if not present |
382 | beginTouch = (beginTouch !== undefined) ? beginTouch : true |
PASSED: Continuous integration, rev:512 jenkins. qa.ubuntu. com/job/ unity8- ci/1615/ jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty/ 629 jenkins. qa.ubuntu. com/job/ generic- mediumtests- trusty- touch/614 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- trusty/ 197 jenkins. qa.ubuntu. com/job/ unity8- trusty- amd64-ci/ 138 jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 139 jenkins. qa.ubuntu. com/job/ unity8- trusty- armhf-ci/ 139/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ unity8- trusty- i386-ci/ 138 jenkins. qa.ubuntu. com/job/ autopilot- testrunner- otto-trusty/ 572 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/629 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- amd64/629/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/614 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- trusty- armhf/614/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- runner- mako/3251 10.97.0. 26:8080/ job/touch- flash-device/ 1295
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 10.97.0. 26:8080/ job/unity8- ci/1615/ rebuild
http://