Comment 0 for bug 1401920

Revision history for this message
Olivier Tilloy (osomon) wrote :

When importing Ubuntu.Components, the base Image QML type is enhanced (with the UCQQuickImageExtension class) to add transparent support for scaling assets.

This breaks the emission of the sourceChanged signal. Application developers cannot implement the onSourceChanged slot to be notified of changes to the value of the 'source' property, and this isn’t documented anywhere.

Another issue I’m observing with this custom extension is that an image is not reloaded if I do the following, and invoke the reload() function on the image (this works if I comment out the import of Ubuntu.Components):

    Image {
        cache: false
        function reload() {
            var s = source
            source = ""
            source = s
        }
    }

Similarly (and maybe even more worrying, actually changing the value of the source property (by appending a fragment to the URL) doesn’t trigger a reload either, as demonstrated by the attached example (requires a random image named "test.jpg" in the same folder).