Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47709

Property of type extended with qmlRegisterExtendedType is ignored if an item of the to-be-extended type is created first

    XMLWordPrintable

Details

    Description

      When running the attached example (having compiled the plugin first) with
      qmlscene -I . main.qml
      We get
      file:///home/tsdgeos_work/extendedTypeBug/main.qml:6:5: QML Image: Cannot open: file:///home/tsdgeos_work/extendedTypeBug/thisShouldBeIgnoredByImport
      qml: file:///home/tsdgeos_work/extendedTypeBug/thisShouldBeIgnoredByImport

      This means that the Image {} in MyItem.qml is not getting the "source" property overridden by the "import ManglingImport 1.0" as it should.

      If you uncomment the Image {} in MySingleton/MySingleton.qml it will work fine and we get
      Ignoring the url you set to QUrl( "file:///home/tsdgeos_work/extendedTypeBug/thisShouldBeIgnoredByImport" )
      qml: MoMoMoMo

      I've traced this a bit and it seems to me that qmlRegisterExtendedType should make sure the object creator takes the new metaobject/propertycache into account even if it has already created an item for that type.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            tsdgeos_canonical Albert Astals Cid (Canonical) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes