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

qmllint: Enums are not recognized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.0
    • 5.15.0 Beta2
    • QML: Tooling
    • 3615c72b666633cef9045012bbb05d5372c35cdf (qt/qtdeclarative/dev)

    Description

       Having valid QML Test.qml

      import QtQuick 2.0
      
      Item {
          enum Status {
              On, Off
          }
      
          id: root
          property int status: Test.Status.Off
      }
      

      or

      import QtQuick 2.0
      
      Item {
          enum Status {
              On, Off
          }
      
          id: root
          property int status: Test.Off
      }
      

      will generate false positive warnings:

      $ qmllint -U Test.qml 
      Warning: Property "Status" not found on type "Test" at 9:31
          property int status: test.Status.Off
                                    ^^^^^^
      

      or

      $ qmllint -U Test.qml 
      Warning: Property "Off" not found on type "Test" at 9:31
          property int status: test.Off
                                    ^^^
      

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            jacek.nijaki Jacek Nijaki
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes