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

qmltc: Assertion when instantiating a "cross-nested" class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.10
    • 6.5.9, 6.8.4, 6.9.1, 6.10.0 Beta2
    • QML: Compiler
    • Windows 10 22H2, MSVC 2022 x64

      See attached project.

       

      Code
      MyBaseItem.qml

      import QtQuick
      
      Item {}
      

       

      MyDerivedItem.qml

      MyBaseItem {}
      

       

      MyMatryoshkaItems.qml

      import QtQuick
      
      Item {
          MyDerivedItem {
              MyBaseItem { id: inner } // Won't assert if this has no ID
          }
      }
      

       

      main.cpp

      using namespace QmltcNestingStudy;
      QQmlEngine engine;
      
      MyBaseItem base(&engine); // OK
      MyDerivedItem derived(&engine); // OK
      MyMatryoshkaItems nested(&engine); // ASSERT: "0 < context->numIdValues()" in file .qmltc/appQmltcNestingStudy/mymatryoshkaitems.cpp, line 868
      

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

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes