aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-15 15:33:23 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-23 10:45:10 +0000
commit941d820d7fe09ee9c1eeb10ddbba28eb45fd559f (patch)
tree87730972002455cb49bd840bc2649894a8308fd1 /src/qml/qml/qqmlvmemetaobject.cpp
parentdb138d0e11de2c80e5608ba7430eb7b2fee6e136 (diff)
Small cleanup
Change-Id: Ifb111ceab64244965569f59eda8d9604131d209d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 1638b5d272..965b1fd3f2 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -641,8 +641,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void *
if (t == QV4::CompiledData::Property::Var) {
// the context can be null if accessing var properties from cpp after re-parenting an item.
QQmlEnginePrivate *ep = (ctxt == 0 || ctxt->engine == 0) ? 0 : QQmlEnginePrivate::get(ctxt->engine);
- QV8Engine *v8e = (ep == 0) ? 0 : ep->v8engine();
- if (v8e) {
+ if (ep) {
if (c == QMetaObject::ReadProperty) {
*reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id);
} else if (c == QMetaObject::WriteProperty) {