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

qmllint --compiler reporting spurious errors on grouped properties

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.3.0 Beta2
    • Qt Script
    • None
    • Kubuntu Linux 21.10
    • Linux/X11

    Description

      Seen here with State > AnchorChanges > anchors:

      qmllint --compiler warning main2.qml

      main2.qml (attached):

                  State {
                       name: "leftState"
                      AnchorChanges {
                          target: mover
                          anchors.left: main.left
                          anchors.right: undefined
                          anchors.horizontalCenter: undefined
                      }
                  },
                  State {
                      name: "middleState"
                      AnchorChanges {
                          target: mover
                          anchors {            // <- Line 67
                              left: undefined
                              right: undefined
                              horizontalCenter: main.horizontalCenter
                          }
                      }
                  },
       
      

      main2.log (attached):

      Warning: main2.qml:67:21: Cannot assign to non-existent default property
                          anchors {
                          ^^^^^^^
      

      This issue was found along with the following bug, but I expect the problem has a different source:

      https://bugreports.qt.io/browse/QTBUG-101364

      Attachments

        1. main2.log
          4 kB
        2. main2.qml
          2 kB

        Issue Links

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

          Activity

            People

              laknoll Lars Knoll
              jbrend Jeffrey Brendecke
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes