aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-15 08:08:32 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-15 08:08:32 +0100
commit7a3dd4c1aef155bae57f0b79eacb3d85e1158c1e (patch)
tree5be261a82b44987cc026779ee7315875ee31f21a /src/qml
parent0fab5761d5428aa708edd66e40fc3c449adc4b11 (diff)
parent19dffeed2e677cf03b6e122c7a15f355ebe413c8 (diff)
Merge remote-tracking branch 'origin/5.6.0' into 5.6
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 8f471132b7..bcd97efee8 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -330,6 +330,8 @@ ReturnedValue QObjectWrapper::getProperty(ExecutionEngine *engine, QObject *obje
} else if (property->isV4Function()) {
Scope scope(engine);
ScopedContext global(scope, engine->qmlContext());
+ if (!global)
+ global = engine->rootContext();
return QV4::QObjectMethod::create(global, object, property->coreIndex);
} else if (property->isSignalHandler()) {
QmlSignalHandler::initProto(engine);