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

qmlsc: Cannot access members of a list

XMLWordPrintable

      Operator [] for typed QML list cannot be compiled if the returned object is used in some way. Attached example shows two cases where it fails in different ways.

       

                      var item = buttons[i]
                      if (item !== undefined) {
                          myButton = item

       

      fails with potentially undefined, and:

                      var item = buttons[i]
                      if (item !== undefined) {
                          setButton(item, "button " + i)

       

      fails with LoadElement for the buttons[i] line.

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

            qtqmlteam Qt Qml Team User
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes