Merge lp:~alecu/unity8/show-hide-dash into lp:unity8

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Michał Sawicz
Approved revision: 349
Merged at revision: 350
Proposed branch: lp:~alecu/unity8/show-hide-dash
Merge into: lp:unity8
Diff against target: 54 lines (+22/-0)
3 files modified
Dash/GenericScopeView.qml (+6/-0)
tests/mocks/Unity/fake_scope.h (+2/-0)
tests/qmltests/Dash/tst_GenericScopeView.qml (+14/-0)
To merge this branch: bzr merge lp:~alecu/unity8/show-hide-dash
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Diego Sarmentero (community) Approve
Review via email: mp+187741@code.launchpad.net

Commit message

Make SHOW_DASH and HIDE_DASH close the current preview

Description of the change

Make SHOW_DASH and HIDE_DASH close the current preview

To post a comment you must log in.
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

looks good

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

PASSED: Continuous integration, rev:349
http://jenkins.qa.ubuntu.com/job/unity8-ci/1138/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/4038
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/1653
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/1886
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/161
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1138
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1138/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1137
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-saucy/350
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4136
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4136/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1655
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/1655/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/1386
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/1398

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

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/GenericScopeView.qml'
2--- Dash/GenericScopeView.qml 2013-09-19 15:28:42 +0000
3+++ Dash/GenericScopeView.qml 2013-09-26 12:00:21 +0000
4@@ -50,6 +50,12 @@
5 }
6 }
7
8+ Connections {
9+ target: scopeView.scope
10+ onShowDash: previewLoader.open = false;
11+ onHideDash: previewLoader.open = false;
12+ }
13+
14 ScopeListView {
15 id: categoryView
16 anchors.fill: parent
17
18=== modified file 'tests/mocks/Unity/fake_scope.h'
19--- tests/mocks/Unity/fake_scope.h 2013-09-02 20:34:05 +0000
20+++ tests/mocks/Unity/fake_scope.h 2013-09-26 12:00:21 +0000
21@@ -90,6 +90,8 @@
22 // signals triggered by activate(..) or preview(..) requests.
23 void previewReady(Preview *preview);
24 void activateApplication(const QString &desktop);
25+ void showDash();
26+ void hideDash();
27
28 protected:
29
30
31=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
32--- tests/qmltests/Dash/tst_GenericScopeView.qml 2013-09-17 16:40:27 +0000
33+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2013-09-26 12:00:21 +0000
34@@ -52,6 +52,20 @@
35 tryCompare(pageHeader, "searchQuery", "")
36 tryCompare(genericScopeView, "previewShown", false);
37 }
38+
39+ function test_showDash() {
40+ var previewLoader = findChild(genericScopeView, "previewLoader");
41+ previewLoader.open = true;
42+ scopes.get(0).showDash();
43+ tryCompare(genericScopeView, "previewShown", false);
44+ }
45+
46+ function test_hideDash() {
47+ var previewLoader = findChild(genericScopeView, "previewLoader");
48+ previewLoader.open = true;
49+ scopes.get(0).hideDash();
50+ tryCompare(genericScopeView, "previewShown", false);
51+ }
52 }
53 }
54 }

Subscribers

People subscribed via source and target branches