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

[REG 6.6 → 6.8] qmlRestrictedType warning errorneously triggers for enum class

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.8
    • 6.8
    • QML: Compiler, QML: Tooling
    • None

    Description

      https://codereview.qt-project.org/c/qt/qtdeclarative/+/541680 changed the code we generate for enums to only apply the scoped marker if enums are registered with
      "RegisterEnumClassesUnscoped" being set to false
      (compare https://codereview.qt-project.org/c/qt/qtdeclarative/+/541680/6/src/qmltyperegistrar/qqmltypescreator.cpp#363)

      This confuses the qmllint logic, which intends to warn about usages like
      `Type.EnumName.EnumEntry`. However, while this is not mandatory with enum classes (unless said "RegisterEnumClassesUnscoped" is added), it' still possible.

      We need to have a way to distinguish "scoped enums" from "only scoped enums".

      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
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes