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

qmllint --compiler reporting spurious errors on grouped properties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 Beta2
    • Fix Version/s: None
    • Component/s: Qt Script
    • Labels:
      None
    • Environment:
      Kubuntu Linux 21.10
    • Platform/s:
      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

              Assignee:
              laknoll Lars Knoll
              Reporter:
              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