Merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684 into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src

Proposed by Timo Jyrinki
Status: Merged
Merged at revision: 113
Proposed branch: lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src
Diff against target: 81 lines (+58/-0)
3 files modified
debian/changelog (+2/-0)
debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch (+55/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~timo-jyrinki/kubuntu-packaging/qtdeclarative-opensource_src_fix_LP_1273684
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Dmitry Shachnev Approve
Review via email: mp+203666@code.launchpad.net

Commit message

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

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

(first time testing the automerger)

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Let's see if it works :)

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-01-24 09:11:04 +0000
3+++ debian/changelog 2014-01-29 05:42:12 +0000
4@@ -41,6 +41,8 @@
5 - Cherry-pick a patch
6 * Add Don-t-use-ebx-in-the-x86-register-allocator.patch
7 - Cherry-pick a patch (LP: #1271033)
8+ * Add V4-Array.push-on-QStringList-should-invoke-putIndexe.patch
9+ - Cherry-pick a patch (LP: #1273684)
10
11 [ Daniel d'Andrada ]
12 * Add debian/patches/fix_qtbug_32004.patch (LP: #1252709)
13
14=== added file 'debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch'
15--- debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch 1970-01-01 00:00:00 +0000
16+++ debian/patches/V4-Array.push-on-QStringList-should-invoke-putIndexe.patch 2014-01-29 05:42:12 +0000
17@@ -0,0 +1,55 @@
18+From e902fdfb33e435ffb3225b19dc3e6d64451e5ac9 Mon Sep 17 00:00:00 2001
19+From: Alberto Mardegan <alberto.mardegan@canonical.com>
20+Date: Tue, 28 Jan 2014 14:03:44 +0200
21+Subject: [PATCH] V4: Array.push() on QStringList should invoke putIndexed()
22+
23+Wrapped sequence types should cause putIndexed() method to be called
24+when Array.push() is used.
25+Fix suggested by Simon Hausmann.
26+
27+[ChangeLog][QtQml] Fix JavaScript Array.push() not working on
28+QStringList properties.
29+
30+Task-number: QTBUG-36491
31+Change-Id: Id04409dd7466a943d8ea8d57cd0514e8de732480
32+---
33+ src/qml/jsruntime/qv4arrayobject.cpp | 2 +-
34+ tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml | 9 +++++++++
35+ 2 files changed, 10 insertions(+), 1 deletion(-)
36+
37+diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
38+index 2964716..d4829e5 100644
39+--- a/src/qml/jsruntime/qv4arrayobject.cpp
40++++ b/src/qml/jsruntime/qv4arrayobject.cpp
41+@@ -308,7 +308,7 @@ ReturnedValue ArrayPrototype::method_push(CallContext *ctx)
42+ return Encode(newLen);
43+ }
44+
45+- if (!instance->protoHasArray() && instance->arrayDataLen <= len) {
46++ if (!instance->protoHasArray() && instance->arrayDataLen <= len && (instance->flags & SimpleArray)) {
47+ for (int i = 0; i < ctx->callData->argc; ++i) {
48+ if (!instance->sparseArray) {
49+ if (len >= instance->arrayAlloc)
50+diff --git a/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
51+index 8d08cc5..8847055 100644
52+--- a/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
53++++ b/tests/auto/qml/qqmlecmascript/data/sequenceConversion.array.qml
54+@@ -141,6 +141,15 @@ Item {
55+ expected = 7;
56+ if (poppedVal != expected) success = false;
57+
58++ // push
59++ msco.stringListProperty = [ "one", "two" ]
60++ msco.stringListProperty.push("three")
61++ expected = [ "one", "two", "three" ]
62++ if (msco.stringListProperty.toString() != expected.toString()) success = false;
63++ msco.stringListProperty.push("four", "five")
64++ expected = [ "one", "two", "three", "four", "five" ]
65++ if (msco.stringListProperty.toString() != expected.toString()) success = false;
66++
67+ // concat
68+ msco.stringListProperty = [ "one", "two" ]
69+ stringList = [ "hello", "world" ]
70+--
71+1.8.5.3
72+
73
74=== modified file 'debian/patches/series'
75--- debian/patches/series 2014-01-24 09:11:04 +0000
76+++ debian/patches/series 2014-01-29 05:42:12 +0000
77@@ -9,3 +9,4 @@
78 Make-sure-the-test-window-has-focus.patch
79 Fix-failing-context-next-0x1-assertion.patch
80 Don-t-use-ebx-in-the-x86-register-allocator.patch
81+V4-Array.push-on-QStringList-should-invoke-putIndexe.patch

Subscribers

People subscribed via source and target branches