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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 9e9a6e60c9..b1b4d5da8d 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -288,6 +288,16 @@ struct Scoped
#endif
}
+ template<typename X>
+ Scoped(const Scope &scope, Returned<X> *x, _Cast)
+ {
+ ptr = scope.engine->jsStackTop++;
+ setPointer(managed_cast<T>(x->getPointer()));
+#ifndef QT_NO_DEBUG
+ ++scope.size;
+#endif
+ }
+
Scoped(const Scope &scope, const ReturnedValue &v)
{
ptr = scope.engine->jsStackTop++;