aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4scopedvalue_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 3a7526197e..a1f6f4b2ac 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -463,9 +463,18 @@ struct Referenced {
Referenced &operator=(const Referenced &o)
{ *ptr = *o.ptr; return *this; }
Referenced &operator=(T *t)
- { ptr->val = t->asReturnedValue(); return *this; }
- Referenced &operator=(const Returned<T> *t) {
- ptr->val = t->getPointer()->asReturnedValue();
+ {
+#if QT_POINTER_SIZE == 4
+ ptr->tag = Value::Managed_Type;
+#endif
+ ptr->m = t;
+ return *this;
+ }
+ Referenced &operator=(Returned<T> *t) {
+#if QT_POINTER_SIZE == 4
+ ptr->tag = Value::Managed_Type;
+#endif
+ ptr->m = t->getPointer();
return *this;
}