Timo Jyrinki has proposed merging 
lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684 
into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src.

Commit message:
* Add V4-Array.push-on-QStringList-should-invoke-putIndexe.patch
  - Cherry-pick a patch (LP: #1273684)

Requested reviews:
  Kubuntu Packagers (kubuntu-packagers)
Related bugs:
  Bug #1273684 in qtdeclarative-opensource-src (Ubuntu): "Qt 5.2: JS 
Array.push() doesn't work on QStringList"
  
https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1273684

For more details, see:
https://code.launchpad.net/~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684/+merge/203666
-- 
https://code.launchpad.net/~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684/+merge/203666
Your team Kubuntu Packagers is requested to review the proposed merge of 
lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684 
into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src.
=== modified file 'debian/changelog'
--- debian/changelog	2014-01-24 09:11:04 +0000
+++ debian/changelog	2014-01-29 05:42:12 +0000
@@ -41,6 +41,8 @@
     - Cherry-pick a patch
   * Add Don-t-use-ebx-in-the-x86-register-allocator.patch
     - Cherry-pick a patch (LP: #1271033)
+  * Add V4-Array.push-on-QStringList-should-invoke-putIndexe.patch
+    - Cherry-pick a patch (LP: #1273684)
 
   [ Daniel d'Andrada ]
   * Add debian/patches/fix_qtbug_32004.patch (LP: #1252709)

=== added file 'debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch'
--- debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch	2014-01-29 05:42:12 +0000
@@ -0,0 +1,55 @@
+From e902fdfb33e435ffb3225b19dc3e6d64451e5ac9 Mon Sep 17 00:00:00 2001
+From: Alberto Mardegan <[email protected]>
+Date: Tue, 28 Jan 2014 14:03:44 +0200
+Subject: [PATCH] V4: Array.push() on QStringList should invoke putIndexed()
+
+Wrapped sequence types should cause putIndexed() method to be called
+when Array.push() is used.
+Fix suggested by Simon Hausmann.
+
+[ChangeLog][QtQml] Fix JavaScript Array.push() not working on
+QStringList properties.
+
+Task-number: QTBUG-36491
+Change-Id: Id04409dd7466a943d8ea8d57cd0514e8de732480
+---
+ src/qml/jsruntime/qv4arrayobject.cpp                            | 2 +-
+ tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
+index 2964716..d4829e5 100644
+--- a/src/qml/jsruntime/qv4arrayobject.cpp
++++ b/src/qml/jsruntime/qv4arrayobject.cpp
+@@ -308,7 +308,7 @@ ReturnedValue ArrayPrototype::method_push(CallContext *ctx)
+         return Encode(newLen);
+     }
+ 
+-    if (!instance->protoHasArray() && instance->arrayDataLen <= len) {
++    if (!instance->protoHasArray() && instance->arrayDataLen <= len && (instance->flags & SimpleArray)) {
+         for (int i = 0; i < ctx->callData->argc; ++i) {
+             if (!instance->sparseArray) {
+                 if (len >= instance->arrayAlloc)
+diff --git a/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
+index 8d08cc5..8847055 100644
+--- a/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
++++ b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
+@@ -141,6 +141,15 @@ Item {
+         expected = 7;
+         if (poppedVal != expected) success = false;
+ 
++        // push
++        msco.stringListProperty = [ "one", "two" ]
++        msco.stringListProperty.push("three")
++        expected = [ "one", "two", "three" ]
++        if (msco.stringListProperty.toString() != expected.toString()) success = false;
++        msco.stringListProperty.push("four", "five")
++        expected = [ "one", "two", "three", "four", "five" ]
++        if (msco.stringListProperty.toString() != expected.toString()) success = false;
++
+         // concat
+         msco.stringListProperty = [ "one", "two" ]
+         stringList = [ "hello", "world" ]
+-- 
+1.8.5.3
+

=== modified file 'debian/patches/series'
--- debian/patches/series	2014-01-24 09:11:04 +0000
+++ debian/patches/series	2014-01-29 05:42:12 +0000
@@ -9,3 +9,4 @@
 Make-sure-the-test-window-has-focus.patch
 Fix-failing-context-next-0x1-assertion.patch
 Don-t-use-ebx-in-the-x86-register-allocator.patch
+V4-Array.push-on-QStringList-should-invoke-putIndexe.patch

-- 
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel

Reply via email to