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

Proposed by Albert Astals Cid
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
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

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

FAILED: Continuous integration, rev:513
http://jenkins.qa.ubuntu.com/job/unity8-ci/1617/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/634
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/619
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/200
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/140
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/141
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/141/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/140
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/576
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/634
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/634/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/619
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/619/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3253
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1297

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/unity8-ci/1617/rebuild

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

Can't repro the error here, try again just in case it's not an unrelated failure

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/674/
Executed test runs:
    SUCCESS: http://10.97.0.26:8080/job/generic-cleanup-mbs/3175
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/646
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/631
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/209
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/60
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/60
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/60/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/60
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/586
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/646
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/646/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/631
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/631/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/3050
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3264
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1318
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/1317

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Failed tests:
    qmltestrunner.Dash::test_show_scope_on_load
    qmltestrunner.DashContent::test_content_end_reached
    qmltestrunner.DashContent::test_hswipe_disabled_vswipe
    qmltestrunner.DashContent::test_is_active
    qmltestrunner.DashContent::test_movement_started_signal
    qmltestrunner.DashContent::test_positioned_at_beginning_signal
    qmltestrunner.DashContent::test_scope_loaded
    qmltestrunner.DashContent::test_scope_mapping

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

I'm getting a segfault in testDashContent::test_is_active(select 0)

http://pastebin.ubuntu.com/6406286/

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

Right

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

OK. Not the ideal solution to make the test pass, but it'll do until 5.2

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/694/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/generic-cleanup-mbs/3219/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/745
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/733
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/256
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/80
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/80
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/80/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/80
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/679
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/745
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/745/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/733
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/733/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3362
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1451

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Dash/GenericScopeView.qml'
--- Dash/GenericScopeView.qml 2013-11-08 03:10:09 +0000
+++ Dash/GenericScopeView.qml 2013-11-14 15:12:49 +0000
@@ -16,15 +16,60 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 0.1
19import Utils 0.1
20import Unity 0.1
19import "../Components"21import "../Components"
20import "../Components/ListItems" as ListItems22import "../Components/ListItems" as ListItems
2123
22ScopeView {24FocusScope {
23 id: scopeView25 id: scopeView
26
27 property Scope scope
28 property SortFilterProxyModel categories: categoryFilter
29 property bool isCurrent
30 property ListModel searchHistory
31 property alias moving: categoryView.moving
32
33 signal endReached
34 signal movementStarted
35 signal positionedAtBeginning
36
24 readonly property alias previewShown: previewListView.onScreen37 readonly property alias previewShown: previewListView.onScreen
25 property bool enableHeightBehaviorOnNextCreation: false38 property bool enableHeightBehaviorOnNextCreation: false
2639
27 moving: categoryView.moving40 // FIXME delay the search so that daemons have time to settle, note that
41 // removing this will break ScopeView::test_changeScope
42 onScopeChanged: {
43 if (scope) {
44 timer.restart();
45 scope.activateApplication.connect(activateApp);
46 }
47 }
48
49 function activateApp(desktopFilePath) {
50 shell.activateApplication(desktopFilePath);
51 }
52
53 Binding {
54 target: scope
55 property: "isActive"
56 value: isCurrent
57 }
58
59 Timer {
60 id: timer
61 interval: 2000
62 onTriggered: scope.searchQuery = ""
63 }
64
65 SortFilterProxyModel {
66 id: categoryFilter
67 model: scope ? scope.categories : null
68 dynamicSortFilter: true
69 filterRole: Categories.RoleCount
70 filterRegExp: /^0$/
71 invertMatch: true
72 }
2873
29 onIsCurrentChanged: {74 onIsCurrentChanged: {
30 pageHeader.resetSearch();75 pageHeader.resetSearch();
3176
=== removed file 'Dash/ScopeView.qml'
--- Dash/ScopeView.qml 2013-10-11 10:07:25 +0000
+++ Dash/ScopeView.qml 1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Utils 0.1
19import Unity 0.1
20
21FocusScope {
22 property Scope scope
23 property SortFilterProxyModel categories: categoryFilter
24 property bool isCurrent
25 property ListModel searchHistory
26 property bool moving: false
27
28 signal endReached
29 signal movementStarted
30 signal positionedAtBeginning
31
32 // FIXME delay the search so that daemons have time to settle, note that
33 // removing this will break ScopeView::test_changeScope
34 onScopeChanged: {
35 if (scope) {
36 timer.restart();
37 scope.activateApplication.connect(activateApp);
38 }
39 }
40
41 function activateApp(desktopFilePath) {
42 shell.activateApplication(desktopFilePath);
43 }
44
45 Binding {
46 target: scope
47 property: "isActive"
48 value: isCurrent
49 }
50
51 Timer {
52 id: timer
53 interval: 2000
54 onTriggered: scope.searchQuery = ""
55 }
56
57 SortFilterProxyModel {
58 id: categoryFilter
59 model: scope ? scope.categories : null
60 dynamicSortFilter: true
61 filterRole: Categories.RoleCount
62 filterRegExp: /^0$/
63 invertMatch: true
64 }
65}
660
=== modified file 'tests/qmltests/CMakeLists.txt'
--- tests/qmltests/CMakeLists.txt 2013-11-08 19:56:54 +0000
+++ tests/qmltests/CMakeLists.txt 2013-11-14 15:12:49 +0000
@@ -45,7 +45,6 @@
45add_qml_test(Dash DashPreview)45add_qml_test(Dash DashPreview)
46add_qml_test(Dash GenericPreview)46add_qml_test(Dash GenericPreview)
47add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})47add_qml_test(Dash GenericScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
48add_qml_test(Dash ScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
49add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins48add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins
50 ${CMAKE_BINARY_DIR}/tests/mocks)49 ${CMAKE_BINARY_DIR}/tests/mocks)
51add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)50add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
5251
=== modified file 'tests/qmltests/Dash/qml/FakeScopeView.qml'
--- tests/qmltests/Dash/qml/FakeScopeView.qml 2013-10-31 10:41:10 +0000
+++ tests/qmltests/Dash/qml/FakeScopeView.qml 2013-11-14 15:12:49 +0000
@@ -19,14 +19,13 @@
1919
20import "../../../../Dash"20import "../../../../Dash"
2121
22ScopeView {22GenericScopeView {
23 id: fakeScopeView23 id: fakeScopeView
2424
25 property alias backColor : back.color25 property alias backColor : back.color
26 moving: listView.moving
2726
28 onEndReached: {27 onEndReached: {
29 if (shell != undefined && shell.scopeStatus != undefined) {28 if (scope != undefined && shell != undefined && shell.scopeStatus != undefined) {
30 shell.scopeStatus[scope.id].endReached++;29 shell.scopeStatus[scope.id].endReached++;
31 }30 }
32 }31 }
@@ -45,71 +44,6 @@
45 id: back44 id: back
46 anchors.fill: parent45 anchors.fill: parent
47 color: "grey"46 color: "grey"
48 }47 z: -1
49
50 function randomBg()
51 {
52 var hex1=new Array("4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
53 var bg="#"+hex1[Math.floor(Math.random()*hex1.length)]+
54 hex1[Math.floor(Math.random()*hex1.length)]+
55 hex1[Math.floor(Math.random()*hex1.length)]+
56 hex1[Math.floor(Math.random()*hex1.length)]+
57 hex1[Math.floor(Math.random()*hex1.length)]+
58 hex1[Math.floor(Math.random()*hex1.length)]
59 return bg
60 }
61
62
63 ListView {
64 id: listView
65 anchors.fill: parent
66 model: scope ? scope.categories : null
67 orientation: ListView.Vertical
68
69 delegate: Column {
70 id: column
71 width: listView.width
72 height: childrenRect.height
73
74 Rectangle {
75 width: listView.width
76 height: units.gu(3)
77 color: randomBg()
78
79 Text {
80 text: name
81 font.family: "Ubuntu"
82 font.weight: Font.Bold
83 font.pixelSize: 20
84 anchors.horizontalCenter: parent.horizontalCenter
85 }
86 }
87 GridView {
88 id: resultsGrid
89 model: results
90 cellWidth: units.gu(10); cellHeight: units.gu(10)
91 height: childrenRect.height
92 width: listView.width
93 interactive: false
94
95 delegate: Component {
96 id: resultDelegate
97 Item {
98 width: resultsGrid.cellWidth; height: resultsGrid.cellHeight
99 Column {
100 anchors.verticalCenter: parent.verticalCenter
101 anchors.horizontalCenter: parent.horizontalCenter
102 Image {
103 width: units.gu(5)
104 height: units.gu(5)
105 source: icon
106 anchors.horizontalCenter: parent.horizontalCenter
107 }
108 Text { text: title; anchors.horizontalCenter: parent.horizontalCenter }
109 }
110 }
111 }
112 }
113 }
114 }48 }
115}49}
11650
=== modified file 'tests/qmltests/Dash/tst_DashContent.qml'
--- tests/qmltests/Dash/tst_DashContent.qml 2013-10-31 10:41:10 +0000
+++ tests/qmltests/Dash/tst_DashContent.qml 2013-11-14 15:12:49 +0000
@@ -28,6 +28,18 @@
2828
29 property ListModel searchHistory: ListModel {}29 property ListModel searchHistory: ListModel {}
3030
31 Item {
32 // Fake. Make a few components less noisy
33 id: greeter
34 signal shownChanged
35 }
36
37 Item {
38 // Fake. Make a few components less noisy
39 id: panel
40 signal searchClicked
41 }
42
31 property var scopeStatus: {43 property var scopeStatus: {
32 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },44 'MockScope1': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
33 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },45 'MockScope2': { 'movementStarted': 0, 'positionedAtBeginning': 0 },
@@ -111,10 +123,17 @@
111 clear_scope_status();123 clear_scope_status();
112 dashContent.visible = true;124 dashContent.visible = true;
113125
126 var dashContentList = findChild(dashContent, "dashContentList");
127 verify(dashContentList != undefined);
128 // TODO For Qt 5.2 remove this wait
129 // and the tryCompare and see if it still crashes when
130 // looping the test
131 wait(1000);
132 if (dashContentList.currentItem !== null) {
133 tryCompare(dashContentList.currentItem, "moving", false);
134 }
114 scopesModel.clear();135 scopesModel.clear();
115 // wait for dash to empty scopes.136 // wait for dash to empty scopes.
116 var dashContentList = findChild(dashContent, "dashContentList");
117 verify(dashContentList != undefined);
118 tryCompare(dashContentList, "count", 0);137 tryCompare(dashContentList, "count", 0);
119 }138 }
120139
@@ -237,7 +256,7 @@
237256
238 var startX = dashContentList.width/2;257 var startX = dashContentList.width/2;
239 var startY = dashContentList.height/2;258 var startY = dashContentList.height/2;
240 touchFlick(dashContentList, startX, startY, startX, startY - units.gu(800));259 touchFlick(dashContentList, startX, startY, startX, startY - units.gu(80));
241260
242 tryCompare(dashContentList.currentItem, "moving", true);261 tryCompare(dashContentList.currentItem, "moving", true);
243262
244263
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2013-11-07 16:28:38 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2013-11-14 15:12:49 +0000
@@ -190,6 +190,13 @@
190190
191 closePreview();191 closePreview();
192 }192 }
193
194 function test_changeScope() {
195 genericScopeView.scope.searchQuery = "test"
196 genericScopeView.scope = scopes.get(1)
197 genericScopeView.scope = scopes.get(0)
198 tryCompare(genericScopeView.scope, "searchQuery", "")
199 }
193 }200 }
194 }201 }
195}202}
196203
=== removed file 'tests/qmltests/Dash/tst_ScopeView.qml'
--- tests/qmltests/Dash/tst_ScopeView.qml 2013-06-13 09:27:02 +0000
+++ tests/qmltests/Dash/tst_ScopeView.qml 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import QtTest 1.0
19import Unity 0.1
20import ".."
21import "../../../Dash"
22import Ubuntu.Components 0.1
23
24Item {
25 width: units.gu(120)
26 height: units.gu(80)
27
28 Scopes {
29 id: scopes
30 }
31
32 ScopeView {
33 id: scopeView
34 anchors.fill: parent
35
36 TestCase {
37 name: "ScopeView"
38 when: scopes.loaded
39
40 function init() {
41 scopeView.scope = scopes.get(0)
42 }
43
44 function test_changeScope() {
45 scopeView.scope.searchQuery = "test"
46 scopeView.scope = scopes.get(1)
47 scopeView.scope = scopes.get(0)
48 tryCompare(scopeView.scope, "searchQuery", "")
49 }
50 }
51 }
52}
530
=== modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
--- tests/utils/modules/Unity/Test/UnityTestCase.qml 2013-11-05 10:18:43 +0000
+++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2013-11-14 15:12:49 +0000
@@ -214,6 +214,8 @@
214214
215 // speed is in pixels/second215 // speed is in pixels/second
216 function touchFlick(item, x, y, toX, toY, beginTouch, endTouch, speed, iterations) {216 function touchFlick(item, x, y, toX, toY, beginTouch, endTouch, speed, iterations) {
217 // Make sure the item is rendered
218 waitForRendering(item);
217219
218 // Default to true for beginTouch if not present220 // Default to true for beginTouch if not present
219 beginTouch = (beginTouch !== undefined) ? beginTouch : true221 beginTouch = (beginTouch !== undefined) ? beginTouch : true

Subscribers

People subscribed via source and target branches