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

qmllint warns about missing-type for properties of type QVector<EnumClass>

    XMLWordPrintable

Details

    • Linux/Wayland
    • 70a38fc67 (dev), 01990eb7b (6.10)

    Description

      A problem has been identified when using an enum class registered with the Q_ENUM_NS macro inside a namespace. The project also includes the Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") directive. When a QVector of this enum type is used as a property, qmllint issues a "missing-type" warning. This issue does not occur if a QVector<int> is used instead.

      Steps to Reproduce:

        • Download the attached minimal example project that demonstrates the issue.
        • Open a terminal and navigate to the root directory of the example project.
        • Build the project using Qt’s build system  with cmake .
        • Run qmllint on the QML files in the project directory. 

      Expected Behavior:
      No warning should be issued by qmllint if the enum type is correctly registered and used.

      Actual Behavior:
      qmllint reports a "missing-type" warning for the QVector<EnumType> property.

      Notes:
      A minimal example reproducing the issue is attached.

      Attachments

        For Gerrit Dashboard: QTBUG-137256
        # Subject Branch Project Status CR V

        Activity

          People

            fabiankosmale Fabian Kosmale
            chakib Chakib Boutaghane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change