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

qmllint does not like accessing other items from Repeaters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.1, 6.4
    • Fix Version/s: 6.5
    • Component/s: QML: Tooling
    • Labels:
    • Platform/s:
      All

      Description

      Given this (perfectly legal) QML snippet:

          Item {
              id: foo
              property int fooInt: 42
      
              Repeater {
                  model: 5
                  Text { text: "Foo=" + foo.fooInt }
              }
          } 

      Produces this warning with qmllint:

      Warning: Test.qml:18:35: Unqualified access
                  Text { text: "Foo=" + foo.fooInt }
                                        ^^^ 

      I could use parent, but that's ugly and error-prone.

      The same problem happens with Repeater3D.

        Attachments

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

          Activity

            People

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            rgriebl Robert Griebl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes