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

qmllint does not like accessing other items from Repeaters

    XMLWordPrintable

Details

    • All
    • e3cb23d34 (dev), 78c5e4375 (6.5)

    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

            ulherman Ulf Hermann
            rgriebl Robert Griebl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes