aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qmlcontext.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-01 01:00:48 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-07-01 10:29:06 +0200
commite6c6cc8fde26bd0b9d37a1812593f17df0b4159a (patch)
tree6aae6724e24a1e051d271e5f67baab5acc358313 /src/qml/jsruntime/qv4qmlcontext.cpp
parent16289f35eb08a9b9a6d56ea8dec549b1f17e4daf (diff)
parent3ecec55e534214aced70ccab7cc929cfb57738a2 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/imports/imports.pro src/qml/qml/qqmlmetatype.cpp Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
Diffstat (limited to 'src/qml/jsruntime/qv4qmlcontext.cpp')
-rw-r--r--src/qml/jsruntime/qv4qmlcontext.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4qmlcontext.cpp b/src/qml/jsruntime/qv4qmlcontext.cpp
index 7b885a9e9e..c832bff051 100644
--- a/src/qml/jsruntime/qv4qmlcontext.cpp
+++ b/src/qml/jsruntime/qv4qmlcontext.cpp
@@ -538,7 +538,6 @@ ReturnedValue QQmlContextWrapper::lookupIdObject(Lookup *l, ExecutionEngine *eng
ReturnedValue QQmlContextWrapper::lookupScopeObjectProperty(Lookup *l, ExecutionEngine *engine, Value *base)
{
- Q_UNUSED(base)
Scope scope(engine);
Scoped<QmlContext> qmlContext(scope, engine->qmlContext());
if (!qmlContext)
@@ -559,12 +558,15 @@ ReturnedValue QQmlContextWrapper::lookupScopeObjectProperty(Lookup *l, Execution
};
ScopedValue obj(scope, QV4::QObjectWrapper::wrap(engine, scopeObject));
+
+ if (base)
+ *base = obj;
+
return QObjectWrapper::lookupGetterImpl(l, engine, obj, /*useOriginalProperty*/ true, revertLookup);
}
ReturnedValue QQmlContextWrapper::lookupContextObjectProperty(Lookup *l, ExecutionEngine *engine, Value *base)
{
- Q_UNUSED(base)
Scope scope(engine);
Scoped<QmlContext> qmlContext(scope, engine->qmlContext());
if (!qmlContext)
@@ -589,6 +591,10 @@ ReturnedValue QQmlContextWrapper::lookupContextObjectProperty(Lookup *l, Executi
};
ScopedValue obj(scope, QV4::QObjectWrapper::wrap(engine, contextObject));
+
+ if (base)
+ *base = obj;
+
return QObjectWrapper::lookupGetterImpl(l, engine, obj, /*useOriginalProperty*/ true, revertLookup);
}