aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-24 16:47:48 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-15 19:12:40 +0000
commitfb52dab6b41ddd6955cb14e1474f90ee5333dac9 (patch)
treea6cfe97160f1f9b1b48ba35977b13e6bdce52b47 /src/qml/qml/qqmlvaluetypewrapper.cpp
parentda705f4036356a3203957c2a7852fa396227fc78 (diff)
Further cleanups
Reduce usage of ScopedContext. Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index b0ab85199d..f9dab64856 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -345,12 +345,9 @@ ReturnedValue QQmlValueTypeWrapper::get(const Managed *m, String *name, bool *ha
if (hasProperty)
*hasProperty = true;
- if (result->isFunction()) {
+ if (result->isFunction())
// calling a Q_INVOKABLE function of a value type
- Scope scope(v4);
- ScopedContext c(scope, v4->rootContext());
- return QV4::QObjectMethod::create(c, r, result->coreIndex);
- }
+ return QV4::QObjectMethod::create(v4->rootContext(), r, result->coreIndex);
#define VALUE_TYPE_LOAD(metatype, cpptype, constructor) \
if (result->propType == metatype) { \