aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4scopedvalue_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-28 13:25:56 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-20 07:39:24 +0100
commited9db939b1fe5ea2f620a4992abdbc553fa3ac41 (patch)
treebd51a5b09a6615ca3e302a27916b51c8681064a6 /src/qml/jsruntime/qv4scopedvalue_p.h
parent9b43867c06ed56ff3c636892af43013842ea12a1 (diff)
Fix the way we set the property name during iteration
This was broken due to the new inheritance scheme for Managed Change-Id: Ia9df50e7e655c3a812a01a2c78945e648aa444dc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 9a76ffcaa4..1337da7f77 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -215,6 +215,10 @@ struct Scoped
Scoped(const Scope &scope)
{
ptr = scope.engine->jsStackTop++;
+ ptr->m = 0;
+#if QT_POINTER_SIZE == 4
+ ptr->tag = QV4::Value::Managed_Type;
+#endif
#ifndef QT_NO_DEBUG
++scope.size;
#endif
@@ -358,6 +362,9 @@ struct Scoped
T *getPointer() {
return static_cast<T *>(ptr->managed());
}
+ typename T::Data **getRef() {
+ return reinterpret_cast<typename T::Data **>(&ptr->m);
+ }
ReturnedValue asReturnedValue() const {
#if QT_POINTER_SIZE == 8