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

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

    XMLWordPrintable

Details

    • 96b29e720 (dev), e3ed72d7e (dev), 35f9ff8c1 (6.8), 290336814 (6.8), 4278f0246 (6.7), 54a352b43 (tqtc/lts-6.5), 6d3777b6e (tqtc/lts-6.2)

    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

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              fabiankosmale Fabian Kosmale
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change