aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-19 12:42:31 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commitb03e545734ab22fca4b98253c451b08c29aaee7e (patch)
treec06c13d5b83ce46d128c0b772d40874e775a7157 /src
parent713ae5106ff04d15c5854e901681d7f3386b9604 (diff)
Make sure ScopedArrayObject works as intended
We need a proper cast method for the class. Change-Id: I8f2e4b3201d70e8fc90148f1780fd377057947bb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4object_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index cfcd97ab06..b97d682c3d 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -462,6 +462,11 @@ inline Object *value_cast(const Value &v) {
}
template<>
+inline ArrayObject *value_cast(const Value &v) {
+ return v.asArrayObject();
+}
+
+template<>
inline ReturnedValue value_convert<Object>(ExecutionContext *ctx, const Value &v)
{
return v.toObject(ctx)->asReturnedValue();