← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1273684] Re: Qt 5.2: JS Array.push() doesn't work on QStringList

 

This bug was fixed in the package qtdeclarative-opensource-src -
5.2.1-3ubuntu10

---------------
qtdeclarative-opensource-src (5.2.1-3ubuntu10) trusty; urgency=medium

  * debian/patches/Fix-crash-when-appending-arrays-to-sub-models-in-lis.patch
    - Backport from upstream https://codereview.qt-project.org/#change,80934
      (LP: #1291602)
 -- Timo Jyrinki <timo-jyrinki@xxxxxxxxxx>   Fri, 14 Mar 2014 09:37:56 +0000

** Changed in: qtdeclarative-opensource-src (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtdeclarative-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1273684

Title:
  Qt 5.2: JS Array.push() doesn't work on QStringList

Status in “qtdeclarative-opensource-src” package in Ubuntu:
  Fix Released

Bug description:
  See:

  https://bugreports.qt-project.org/browse/QTBUG-36491


  Please run the following code in qmlscene:

      import QtQuick 2.0

      DropArea {
          keys: ["cat"]

          Component.onCompleted: {
              console.log("My animals at start: " + keys)
              keys.push("dog")
              console.log("My animals after push: " + keys)
              keys[keys.length] = "dog"
              console.log("My animals after insert: " + keys)
          }
      }

  Under Qt 5.0, this prints:

      My animals at start: cat
      My animals after push: cat,dog
      My animals after insert: cat,dog,dog

  But under Qt 5.2, the push() method inserts an empty string:

      My animals at start: cat
      My animals after push: cat,
      My animals after insert: cat,,dog

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1273684/+subscriptions


References