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

qmlsc: Cannot access members of a list

    XMLWordPrintable

Details

    Description

      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.

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes