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

    • 218eb5f571 (qt/qtdeclarative/dev) 218eb5f571 (qt/tqtc-qtdeclarative/dev) 4c62782c23 (qt/qtdeclarative/6.3) 4c62782c23 (qt/tqtc-qtdeclarative/6.3) 1c8d34e459 (qt/tqtc-qtdeclarative/6.2) 4c62782c23 (qt/qtdeclarative/6.3.2)

    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

            qtqmlteam Qt Qml Team User
            agolubev Andrei Golubev
            Vladimir Minenko Vladimir Minenko
            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