Merge lp://qastaging/~tpeeters/ubuntu-ui-toolkit/crossFadeImage_SourceSize_fix into lp://qastaging/ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Merged
Approved by: Tim Peeters
Approved revision: 781
Merged at revision: 798
Proposed branch: lp://qastaging/~tpeeters/ubuntu-ui-toolkit/crossFadeImage_SourceSize_fix
Merge into: lp://qastaging/ubuntu-ui-toolkit
Diff against target: 143 lines (+71/-2)
4 files modified
CHANGES (+1/-0)
components.api (+1/-1)
modules/Ubuntu/Components/CrossFadeImage.qml (+43/-1)
tests/unit/tst_components/tst_CrossFadeImage.qml (+26/-0)
To merge this branch: bzr merge lp://qastaging/~tpeeters/ubuntu-ui-toolkit/crossFadeImage_SourceSize_fix
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Zsombor Egri Needs Fixing
Günter Schwann (community) Approve
Michael Zanetti (community) Needs Information
Review via email: mp+187454@code.qastaging.launchpad.net

Commit message

Update CrossFadeImage API so that sourceSize can be set by the applications.

* CHANGED in CrossFadeImage: readonly property size sourceSize TO property size sourceSize

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

59 + } else if (internals.loadingImage && (sourceSize != Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height))) {

Hmm... Can it be that internals.loadingImage is null at some point? In that case setting the sourceSize would get lost if setting during that period. If it can't happen we can probably drop this check either. In any case I think the "internals.loadingImage &&" should not be here as the sourceSize gets bound to currentImage and nextImage directly anyways.

No tests?

review: Needs Information
Revision history for this message
Günter Schwann (schwann) wrote :

looks good, and helps fixing the issue decscribed in the bug

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

> 59 + } else if (internals.loadingImage && (sourceSize !=
> Qt.size(internals.loadingImage.sourceSize.width,
> internals.loadingImage.sourceSize.height))) {
>
> Hmm... Can it be that internals.loadingImage is null at some point? In that
> case setting the sourceSize would get lost if setting during that period. If
> it can't happen we can probably drop this check either. In any case I think
> the "internals.loadingImage &&" should not be here as the sourceSize gets
> bound to currentImage and nextImage directly anyways.

apparently it can be null/undefined when the object is being created and image pointers are not yet set.

>
> No tests?

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 :
review: Needs Fixing (continuous-integration)
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 :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

> > 59 + } else if (internals.loadingImage && (sourceSize !=
> > Qt.size(internals.loadingImage.sourceSize.width,
> > internals.loadingImage.sourceSize.height))) {
> >
> > Hmm... Can it be that internals.loadingImage is null at some point? In that
> > case setting the sourceSize would get lost if setting during that period. If
> > it can't happen we can probably drop this check either. In any case I think
> > the "internals.loadingImage &&" should not be here as the sourceSize gets
> > bound to currentImage and nextImage directly anyways.
>
> apparently it can be null/undefined when the object is being created and image
> pointers are not yet set.

Yeah, this is what I meant. So doesn't this fail in that case?

I mean, if you're using it like this:

CrossFadeImage {
   source: "foo.png"
   sourceSize.height: 500
   sourceSize.width: 500
}

Given that the whole thing is built up and sourceSize is set immediately, when loadingImage is still null. The sourceSize setting would just be discarded afaics. Unless the constructions happens before the property setting. In that case the check doesn't break anything, but is still useles..

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

52 +
53 + onSourceSizeChanged: {

qdoc failure given on this line. Also remember to merge trunk, there were issues with autopilot tests.

review: Needs Fixing
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 :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

> > > 59 + } else if (internals.loadingImage && (sourceSize !=
> > > Qt.size(internals.loadingImage.sourceSize.width,
> > > internals.loadingImage.sourceSize.height))) {
> > >
> > > Hmm... Can it be that internals.loadingImage is null at some point? In
> that
> > > case setting the sourceSize would get lost if setting during that period.
> If
> > > it can't happen we can probably drop this check either. In any case I
> think
> > > the "internals.loadingImage &&" should not be here as the sourceSize gets
> > > bound to currentImage and nextImage directly anyways.
> >
> > apparently it can be null/undefined when the object is being created and
> image
> > pointers are not yet set.
>
> Yeah, this is what I meant. So doesn't this fail in that case?
>
> I mean, if you're using it like this:
>
> CrossFadeImage {
> source: "foo.png"
> sourceSize.height: 500
> sourceSize.width: 500
> }
>
> Given that the whole thing is built up and sourceSize is set immediately, when
> loadingImage is still null. The sourceSize setting would just be discarded
> afaics. Unless the constructions happens before the property setting. In that
> case the check doesn't break anything, but is still useles..

I added a test that checks for explicitly defined source sizes.

If no image is loaded yet, sourceSize is set to 0,0, and setting it implicitly will trigger a changed and will set forcedSourceSize, and as a result the image sourceSize will be ignored in the future. So it all seems good.

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

maguro device was stuck, re-building.

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 :
review: Needs Fixing (continuous-integration)
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 :
review: Needs Fixing (continuous-integration)
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 :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

let's see if stuff gets merged now.

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

just need positive CI results

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/ubuntu-ui-toolkit-autolanding/377/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy-vm/415
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/3041
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-amd64-autolanding/304
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-autolanding/303
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-autolanding/303/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-vm-saucy/312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4563
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4563/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3043
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3043/artifact/work/output/*zip*/output.zip
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2548
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2599
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/122
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/123

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

PASSED: Continuous integration, rev:781
http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-ci/998/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy-vm/417
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/3043
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-amd64-ci/855
    SUCCESS: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-ci/855
        deb: http://jenkins.qa.ubuntu.com/job/ubuntu-ui-toolkit-saucy-armhf-ci/855/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-vm-saucy/314
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4565
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-i386/4565/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3045
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/3045/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/2550
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/2601
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/130
    SUCCESS: http://10.97.0.26:8080/job/touch-flash-device/131

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/ubuntu-ui-toolkit-ci/998/rebuild

review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

approved by jenkins??! woohoo!!! :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: