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

QQmlComponent::create() crashes when creeating a QML_EXTENDED_NAMESPACE(Type) object when Type is a Q_OBJECT extending a property

    XMLWordPrintable

    Details

    • Commits:
      218eb5f571 (qt/qtdeclarative/dev) 218eb5f571 (qt/tqtc-qtdeclarative/dev)

      Description

      Given a type structure like:

      class Extension : public QObject
      {
          Q_OBJECT
          Q_PROPERTY(int extension READ extension WRITE setExtension NOTIFY extensionChangedWithValue FINAL)
          // ...
      };
      
      class ExtendedNamespaceByObject : public QObject
      {
          Q_OBJECT
          QML_ELEMENT
          QML_EXTENDED_NAMESPACE(Extension)
      
          Q_PROPERTY(int extension READ extension WRITE setExtension NOTIFY extensionChanged)
          // ...
      };
      

      one can observe a crash when attempting to create the ExtendedNamespaceByObject object in a QML setting:

      import MyModule // contains ExtendedNamespaceByObject
      import QtQml
      ExtendedNamespaceByObject {
          extension: 10
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            agolubev Andrei Golubev
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes