aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4scopedvalue_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-05-08 22:27:23 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:17 +0200
commit45f7120d42f628e86ae2bf3bd2789fdb190490e0 (patch)
tree5a90ec2c80f46d20124cf4adac14704777301f46 /src/qml/jsruntime/qv4scopedvalue_p.h
parent4632c0bfff911fa84f00aab9721519427cfa9921 (diff)
Convert regexps
Change-Id: I5b62a265a7ce363a16b1e14ae93cadbb1ab0cb5b 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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 5a7852f49b..6045ea5794 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -117,6 +117,15 @@ struct ScopedValue
#endif
}
+ ScopedValue(const Scope &scope, HeapObject *o)
+ {
+ ptr = scope.engine->jsStackTop++;
+ ptr->m = reinterpret_cast<Managed *>(o);
+#ifndef QT_NO_DEBUG
+ ++scope.size;
+#endif
+ }
+
ScopedValue(const Scope &scope, Managed *m)
{
ptr = scope.engine->jsStackTop++;
@@ -150,6 +159,11 @@ struct ScopedValue
return *this;
}
+ ScopedValue &operator=(HeapObject *o) {
+ ptr->m = reinterpret_cast<Managed *>(o);
+ return *this;
+ }
+
ScopedValue &operator=(Managed *m) {
ptr->val = m->asReturnedValue();
return *this;