diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-11-21 09:17:01 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-11 08:40:41 +0100 |
commit | ddfe9defa803fdbfab10ab58b77df242cdb4cedd (patch) | |
tree | b13af2424e8ea466a9de9fece8f2fbb6415ce8b6 /src/qml/qml | |
parent | 254cf16ed4c6007a59a7cd5d64bb621430b3c01d (diff) |
Encapsulate accesses to the root context
Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 6047d62104..2e98fd3e37 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -265,7 +265,7 @@ bool QQmlObjectCreator::populateDeferredProperties(QObject *instance) sharedState->allJavaScriptObjects = valueScope.alloc(compiledData->totalObjectCount); QV4::ScopedObject qmlScope(valueScope, QV4::QmlContextWrapper::qmlScope(QV8Engine::get(engine), context, _scopeObject)); - QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext, qmlScope)); + QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext(), qmlScope)); // ### GC QV4::ExecutionContext *qmlContext = QV4::ScopedContext(valueScope, qmlBindingWrapper->context()).getPointer(); @@ -1176,7 +1176,7 @@ QObject *QQmlObjectCreator::createInstance(int index, QObject *parent, bool isCo QV4::Scope valueScope(v4); QV4::ScopedObject qmlScope(valueScope, QV4::QmlContextWrapper::qmlScope(QV8Engine::get(engine), context, _scopeObject)); - QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext, qmlScope)); + QV4::Scoped<QV4::QmlBindingWrapper> qmlBindingWrapper(valueScope, v4->memoryManager->alloc<QV4::QmlBindingWrapper>(v4->rootContext(), qmlScope)); // ### GC QV4::ExecutionContext *qmlContext = QV4::ScopedContext(valueScope, qmlBindingWrapper->context()).getPointer(); diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index b84c878d53..e8cc7e65b7 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1679,7 +1679,7 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject DEFINE_OBJECT_VTABLE(QQmlXMLHttpRequestWrapper); Heap::QQmlXMLHttpRequestCtor::QQmlXMLHttpRequestCtor(ExecutionEngine *engine) - : Heap::FunctionObject(engine->rootContext, QStringLiteral("XMLHttpRequest")) + : Heap::FunctionObject(engine->rootContext(), QStringLiteral("XMLHttpRequest")) { setVTable(QV4::QQmlXMLHttpRequestCtor::staticVTable()); Scope scope(engine); |