Merge lp:~zsombi/ubuntu-ui-toolkit/popover-dismiss-buttons into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Cris Dywan
Approved revision: 1016
Merged at revision: 1022
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/popover-dismiss-buttons
Merge into: lp:ubuntu-ui-toolkit/staging
Prerequisite: lp:~zsombi/ubuntu-ui-toolkit/textinput-text-selection
Diff against target: 111 lines (+85/-0)
3 files modified
modules/Ubuntu/Components/Popups/Popover.qml (+1/-0)
modules/Ubuntu/Components/Popups/PopupBase.qml (+1/-0)
tests/unit_x11/tst_components/tst_popover.qml (+83/-0)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/popover-dismiss-buttons
Reviewer Review Type Date Requested Status
Cris Dywan Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+216006@code.launchpad.net

Commit message

Dismiss Popovers when any of the mouse buttons is pressed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1013. By Zsombor Egri

prereq merge

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1014. By Zsombor Egri

test fix

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

This looks to do the job well.

review: Approve
1015. By Zsombor Egri

prereq merge

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

PASSED: Continuous integration, rev:1015
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/91/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/417
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/5041
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/91
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/91
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/91/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/91
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/379
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4663
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4663/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6383
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4339
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/5230
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/5230/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/91/rebuild

review: Approve (continuous-integration)
1016. By Zsombor Egri

prereq sync

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

PASSED: Continuous integration, rev:1016
http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/100/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/433
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/5057
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-amd64-ci/100
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/100
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-armhf-ci/100/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-trusty-i386-ci/100
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/390
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4680
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4680/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/6401
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/4351
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/5246
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/5246/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/100/rebuild

review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

I can't fully run the tests due to "QIODevice::write: device not open" failing tst_expandablescolumn.qml, but it seems to work, and J likes ot.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/Popups/Popover.qml'
--- modules/Ubuntu/Components/Popups/Popover.qml 2014-04-20 19:25:12 +0000
+++ modules/Ubuntu/Components/Popups/Popover.qml 2014-04-25 05:30:32 +0000
@@ -204,6 +204,7 @@
204204
205 StyledItem {205 StyledItem {
206 id: foreground206 id: foreground
207 objectName: "popover_foreground"
207208
208 //styling properties209 //styling properties
209 property real minimumWidth: units.gu(40)210 property real minimumWidth: units.gu(40)
210211
=== modified file 'modules/Ubuntu/Components/Popups/PopupBase.qml'
--- modules/Ubuntu/Components/Popups/PopupBase.qml 2014-04-20 19:25:12 +0000
+++ modules/Ubuntu/Components/Popups/PopupBase.qml 2014-04-25 05:30:32 +0000
@@ -142,6 +142,7 @@
142 InverseMouseArea {142 InverseMouseArea {
143 id: eventGrabber143 id: eventGrabber
144 enabled: true144 enabled: true
145 acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
145 anchors.fill: __foreground146 anchors.fill: __foreground
146 sensingArea: dismissArea147 sensingArea: dismissArea
147 propagateComposedEvents: !grabDismissAreaEvents148 propagateComposedEvents: !grabDismissAreaEvents
148149
=== added file 'tests/unit_x11/tst_components/tst_popover.qml'
--- tests/unit_x11/tst_components/tst_popover.qml 1970-01-01 00:00:00 +0000
+++ tests/unit_x11/tst_components/tst_popover.qml 2014-04-25 05:30:32 +0000
@@ -0,0 +1,83 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16import QtQuick 2.0
17import QtTest 1.0
18import Ubuntu.Test 0.1
19import Ubuntu.Components 0.1
20import Ubuntu.Components.Popups 0.1
21
22MainView {
23 id: main
24 width: units.gu(40)
25 height: units.gu(71)
26
27 Button {
28 id: caller
29 anchors.centerIn: parent
30 text: "Press me"
31 onClicked: {
32 var popover = PopupUtils.open(popoverComponent, caller);
33 popoverSpy.target = testCase.findChild(popover, "popover_foreground");
34 popoverSpy.clear();
35 }
36 }
37
38 // spy to listen on the popover foreground's hideCompleted() signal
39 SignalSpy {
40 id: popoverSpy
41 signalName: "hideCompleted"
42 }
43
44 Component {
45 id: popoverComponent
46 Popover {
47 objectName: "popover"
48 Rectangle {
49 width: units.gu(20)
50 height: units.gu(20)
51 color: "blue"
52 }
53 }
54 }
55
56 UbuntuTestCase {
57 id: testCase
58 name: "PopoverTests"
59 when: windowShown
60
61 function cleanup() {
62 popoverSpy.target = null;
63 popoverSpy.clear();
64 }
65
66 function test_dismiss_on_click_data() {
67 return [
68 {button: Qt.LeftButton},
69 {button: Qt.MiddleButton},
70 {button: Qt.RightButton},
71 ];
72 }
73
74 function test_dismiss_on_click(data) {
75 mouseClick(caller, caller.width / 2, caller.height / 2);
76 waitForRendering(caller);
77 verify(popoverSpy.target !== null, "The popover did not open");
78 // dismiss
79 mouseClick(main, 10, 10, data.button);
80 popoverSpy.wait();
81 }
82 }
83}

Subscribers

People subscribed via source and target branches