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

Regression in list concatenation

    XMLWordPrintable

Details

    • d9b934a1c115f6eac00b9b2564c908f7eecd196a

    Description

      When the following snippet is run, it causes list2 to be a list of length 3, with contents "1", "2", "hello,world". With QtQuick 1, this produced a list of length 4, with contents "1", "2", "hello", "world"

      import QtQuick 2.0
      
      Item {
          property variant list2
      
          Component.onCompleted: {
              list2 = ["1", "2"]
              // listObject.mylist is a QStringList property coming from C++
              // of size 2 ("hello","world")
              list2 = list2.concat(listObject.mylist)
              for (var i = 0; i < list2.length; ++i)
                  console.log(list2[i])
          }
      }
      

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            mbrasser Michael Brasser
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes