Merge lp:~paulliu/unity8/fix-lazyimage1 into lp:unity8

Proposed by Ying-Chun Liu
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 776
Merged at revision: 788
Proposed branch: lp:~paulliu/unity8/fix-lazyimage1
Merge into: lp:unity8
Diff against target: 33 lines (+8/-2)
2 files modified
qml/Components/LazyImage.qml (+2/-2)
tests/qmltests/Components/tst_LazyImage.qml (+6/-0)
To merge this branch: bzr merge lp:~paulliu/unity8/fix-lazyimage1
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+211728@code.launchpad.net

Commit message

Fix a small typo in LazyImage: scale -> scaleTo

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Albert Astals Cid (aacid) wrote :

can we have a test that makes sure it doesn't break again?

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:775
http://jenkins.qa.ubuntu.com/job/unity8-ci/2558/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4070/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3655
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1428/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1079
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1083
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1083/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1079
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3555/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4122
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4122/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3657
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3657/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5979
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/4984

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

review: Needs Fixing (continuous-integration)
lp:~paulliu/unity8/fix-lazyimage1 updated
776. By Ying-Chun Liu on 2014-03-21

Merge mzanetti's test cases.

PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:776
http://jenkins.qa.ubuntu.com/job/unity8-ci/2592/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4144
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3728
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1462
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1113
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1117
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1117/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1113
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3609
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4208
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4208/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3730
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3730/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6038
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5080

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

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass? If not, please explain why.
No, unrelated failure

review: Approve
lp:~paulliu/unity8/fix-lazyimage1 updated
777. By Ying-Chun Liu on 2014-03-26

Merge trunk

PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:777
http://jenkins.qa.ubuntu.com/job/unity8-ci/2653/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4308
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3907
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1523
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1174
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1178
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1178/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1174
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3731
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4407
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4407/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3909
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3909/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6188
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5309

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2653/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 'qml/Components/LazyImage.qml'
2--- qml/Components/LazyImage.qml 2013-10-14 22:13:48 +0000
3+++ qml/Components/LazyImage.qml 2014-03-26 14:31:57 +0000
4@@ -99,10 +99,10 @@
5 horizontalAlignment: Image.AlignHCenter
6 verticalAlignment: Image.AlignVCenter
7 sourceSize.width: root.scaleTo == "width" ? root.width
8- : root.scaleTo == "fit" && root.width < root.height ? root.width
9+ : root.scaleTo == "fit" && root.width <= root.height ? root.width
10 : 0
11 sourceSize.height: root.scaleTo == "height" ? root.height
12- : root.scale == "fit" && root.height < root.width ? root.height
13+ : root.scaleTo == "fit" && root.height <= root.width ? root.height
14 : 0
15 }
16 }
17
18=== modified file 'tests/qmltests/Components/tst_LazyImage.qml'
19--- tests/qmltests/Components/tst_LazyImage.qml 2014-02-28 15:15:31 +0000
20+++ tests/qmltests/Components/tst_LazyImage.qml 2014-03-26 14:31:57 +0000
21@@ -168,6 +168,12 @@
22 compare(data.image.initialHeight, data.initialHeight);
23 compare(data.image.initialWidth, data.initialWidth);
24
25+ // check the sourceSize
26+ var sourceHeight = (data.image.scaleTo === "height" || (data.image.scaleTo === "fit" && data.height <= data.width)) ? data.height : 0
27+ var sourceWidth = (data.image.scaleTo === "width" || (data.image.scaleTo === "fit" && data.width <= data.height)) ? data.width : 0
28+ compare(data.image.sourceSize.height, sourceHeight);
29+ compare(data.image.sourceSize.width, sourceWidth);
30+
31 // check the shape dimensions
32 var shape = findChild(data.image, "shape");
33 compare(shape.width, data.imageWidth);

Subscribers

People subscribed via source and target branches