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

qmllint: warning when accessing JS array declared as a var

    XMLWordPrintable

Details

    • 25ae86d1d98dbf3900eefea152b072939be8ea71 (qt/qtdeclarative/dev) ec34177c088a18a6ad0f8eb4a69fcdd662e6afee (qt/qtdeclarative/6.1)

    Description

      Warning: Type of property "_shadows" not found at src/imports/controls/material/ElevationEffect.qml:218:77
          readonly property var _shadow: _shadows[Math.max(0, Math.min(elevation, _shadows.length - 1))]
      

      _shadows is declared as:

      readonly property var _shadows: [
              [{offset: 0, blur: 0, spread: 0},
               {offset: 0, blur: 0, spread: 0},
               {offset: 0, blur: 0, spread: 0}],
              // ...
      

      I don't think it should complain about it because there is no other way to declare a JS array.

      Attachments

        Issue Links

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

          Activity

            People

              max.goldstein Maximilian Goldstein
              mitch_curtis Mitch Curtis
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes