Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/imageSourceNotNOTIFYable into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 1343
Merged at revision: 1341
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/imageSourceNotNOTIFYable
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 102 lines (+35/-6)
4 files modified
components.api (+2/-0)
modules/Ubuntu/Components/plugin/ucqquickimageextension.cpp (+3/-0)
modules/Ubuntu/Components/plugin/ucqquickimageextension.h (+4/-1)
tests/unit_x11/tst_components/tst_imageprovider.qml (+26/-5)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/imageSourceNotNOTIFYable
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Cris Dywan Approve
Review via email: mp+242655@code.launchpad.net

Commit message

Re-introduce NOTIFY to Image under a different name

Description of the change

Re-introduce NOTIFY to Image under a different name

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

In theory I like the approach; unfortunately I can't build the branch right now and I don't know why. If Jenkins can run the tests successfully I'll finish my review.

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

FAILED: Continuous integration, rev:1343
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/imageSourceNotNOTIFYable/+merge/242655/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-ci/1263/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/6616/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-amd64-ci/1096
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/1095
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-armhf-ci/1095/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-sdk-team-ubuntu-ui-toolkit-staging-utopic-i386-ci/1095
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/6179/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/7868
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/7868/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/16183

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

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

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/imageSourceNotNOTIFYable/+merge/242655/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) :
review: Approve
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
1=== modified file 'components.api'
2--- components.api 2014-11-18 13:32:37 +0000
3+++ components.api 2014-11-24 16:47:39 +0000
4@@ -909,6 +909,8 @@
5 prototype: "QQuickImageBase"
6 exports: ["QQuickImageBase 0.1", "QQuickImageBase 1.0"]
7 Property { name: "source"; type: "QUrl" }
8+ Signal { name: "extendedSourceChanged" }
9+ Signal { name: "extendedSourceChanged" }
10 name: "UCStateSaver"
11 prototype: "QObject"
12 exports: ["StateSaver 0.1", "StateSaver 1.0"]
13
14=== modified file 'modules/Ubuntu/Components/plugin/ucqquickimageextension.cpp'
15--- modules/Ubuntu/Components/plugin/ucqquickimageextension.cpp 2014-11-18 09:59:02 +0000
16+++ modules/Ubuntu/Components/plugin/ucqquickimageextension.cpp 2014-11-24 16:47:39 +0000
17@@ -41,6 +41,9 @@
18 {
19 QObject::connect(&UCUnits::instance(), SIGNAL(gridUnitChanged()),
20 this, SLOT(reloadSource()), Qt::UniqueConnection);
21+ // connect sourceChanged signal to extendedSourceChanged
22+ QObject::connect(m_image, &QQuickImageBase::sourceChanged,
23+ this, &UCQQuickImageExtension::extendedSourceChanged);
24 }
25
26 QUrl UCQQuickImageExtension::source() const
27
28=== modified file 'modules/Ubuntu/Components/plugin/ucqquickimageextension.h'
29--- modules/Ubuntu/Components/plugin/ucqquickimageextension.h 2014-11-18 09:59:02 +0000
30+++ modules/Ubuntu/Components/plugin/ucqquickimageextension.h 2014-11-24 16:47:39 +0000
31@@ -30,7 +30,7 @@
32 class UCQQuickImageExtension : public QObject
33 {
34 Q_OBJECT
35- Q_PROPERTY(QUrl source READ source WRITE setSource)
36+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY extendedSourceChanged)
37
38 public:
39 explicit UCQQuickImageExtension(QObject *parent = 0);
40@@ -38,6 +38,9 @@
41 QUrl source() const;
42 virtual void setSource(const QUrl& url);
43
44+Q_SIGNALS:
45+ void extendedSourceChanged();
46+
47 protected Q_SLOTS:
48 void reloadSource();
49
50
51=== modified file 'tests/unit_x11/tst_components/tst_imageprovider.qml'
52--- tests/unit_x11/tst_components/tst_imageprovider.qml 2014-11-18 13:33:48 +0000
53+++ tests/unit_x11/tst_components/tst_imageprovider.qml 2014-11-24 16:47:39 +0000
54@@ -23,11 +23,20 @@
55 width: units.gu(50)
56 height: units.gu(100)
57
58- Image {
59- id: test
60- width: units.gu(20)
61- height: units.gu(20)
62- source: "/usr/share/icons/ubuntu-mobile/actions/scalable/add.svg"
63+ Column {
64+ Image {
65+ id: test
66+ width: units.gu(20)
67+ height: units.gu(20)
68+ source: "/usr/share/icons/ubuntu-mobile/actions/scalable/add.svg"
69+ visible: source != ""
70+ }
71+ Image {
72+ id: bindingTest
73+ width: units.gu(20)
74+ height: units.gu(20)
75+ visible: source != ""
76+ }
77 }
78
79 UbuntuTestCase {
80@@ -39,10 +48,22 @@
81 signalName: "sourceChanged"
82 }
83
84+ SignalSpy {
85+ id: visibleChangedSpy
86+ signalName: "visibleChanged"
87+ }
88+
89 function test_sourceChanged() {
90 sourceChangeSpy.target = test;
91 test.source = "/usr/share/icons/ubuntu-mobile/actions/scalable/delete.svg";
92 sourceChangeSpy.wait();
93 }
94+
95+ function test_sourceNOTIFYable() {
96+ /* Test source through visible to cover NOTIFYable errors */
97+ visibleChangedSpy.target = bindingTest;
98+ bindingTest.source = "/usr/share/icons/ubuntu-mobile/actions/scalable/help.svg";
99+ visibleChangedSpy.wait();
100+ }
101 }
102 }

Subscribers

People subscribed via source and target branches