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

qmllint does not properly warn about duplictaed ids

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3
    • 6.3, 6.2
    • QML: Tooling
    • 096a1c4f6e (qt/qtdeclarative/dev) 096a1c4f6e (qt/tqtc-qtdeclarative/dev)

    Description

      Consider 

       

      import QtQuick
      
      Item {
          id: root
          Item {
              id: root
          }
      }
      

      qmllint will not warn about the duplicate id. Furthermore, when accessing properties that exist only one one of the types (and the "wrong" type is picked internally), we end up with rather confusing error messages:

       

      import Qt
      QuickItem {
          id: root
          property var s
          Rectangle {
              id: root
              property var t: root.s
          }
      }
      

      will result in the not so obvious

      Warning: test.qml:9:30: Property "s" not found on type "Rectangle"
      {{ property var t: root.s}}

       

       

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes