aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/testtypes.h
diff options
context:
space:
mode:
authorGlenn Watson <glenn.watson@nokia.com>2012-07-18 13:20:00 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-08 00:34:22 +0200
commitec519529087cc3005d55242569dcbca3dcee91bf (patch)
tree9fb83a2396c62e5231b11aaff013e94ed7f239dc /tests/auto/qml/qqmlecmascript/testtypes.h
parent8bb5677f45935a03f1ed439e8a01ca71e9f1152c (diff)
Support JS Array.sort() function for sequence wrappers.
The V8 natve sort implementation calls some functions that are incompatible with the way sequence wrappers work. In particular, it calls an internal length() function which does not pass through the length accessor provided by sequence wrappers, so the sort function always thinks the array is zero length. Instead, clone the array prototype and override the sort function with one that is specific to sequence wrappers. Task-number: QTBUG-25269 Change-Id: Ic83b9ee0bd3a0707e512f28057f0f99b432fded4 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index d857b64d80..eaecf71ba7 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -755,7 +755,7 @@ public:
Q_INVOKABLE void method_overload(const QJsonArray &a) { invoke(26); m_actuals << QVariant::fromValue(a); }
Q_INVOKABLE void method_overload(const QJsonValue &a) { invoke(27); m_actuals << QVariant::fromValue(a); }
- Q_INVOKABLE void method_unknown(MyInvokableObject *o) { invoke(28); }
+ Q_INVOKABLE void method_unknown(MyInvokableObject *) { invoke(28); }
private:
friend class MyInvokableBaseObject;