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

Re-registration of enum types doesn't work

    XMLWordPrintable

    Details

    • Commits:
      2cfe1bb09c11432ca5033f9589243e9e62fe9488

      Description

      If I do the following

      cpp:
      qmlRegisterType<MyType1>("MyModule", 1, 0, "MyType");
      qmlRegisterType<MyType2>("MyModule", 1, 0, "MyType");
      runSomeQmlApplication();
      
      qml:
      MyType{ ... }
      

      then QML will instantiate MyType2. This makes sense, it was the last type to be registered.

      However, if I both MyType1 and MyType2 has an enum value ENUM_VAL, then doing MyType.ENUM_VAL will use MyType1::ENUM_VAL even though MyType2 is instantiated

      Related to QTBUG-56521 and blocking workaround for QTBUG-56172.

        Attachments

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

          Activity

            People

            • Assignee:
              andysh Andy Shaw
              Reporter:
              jornb Jørn Bersvendsen
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes