← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1401920] [NEW] Image extension fails to notify of source changes

 

Public bug reported:

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).

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "test.qml"
   https://bugs.launchpad.net/bugs/1401920/+attachment/4279590/+files/test.qml

** Description changed:

  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
-         }
-     }
+     Image {
+         cache: false
+         function reload() {
+             var s = source
+             source = ""
+             source = s
+         }
+     }
  
- Similarly (and maybe even more worrying, actually changing the value of
+ 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).

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu.
https://bugs.launchpad.net/bugs/1401920

Title:
  Image extension fails to notify of source changes

Status in ubuntu-ui-toolkit package in Ubuntu:
  New

Bug description:
  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).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1401920/+subscriptions


Follow ups

References