aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-21 13:18:23 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-11 08:40:48 +0100
commit4322c8d7686c7cbbdf348146d32d705007b21d56 (patch)
treec60d6568f3b47786b24c0d74eb6e61b7cac18add /src/qml/qml/qqmlcomponent.cpp
parentddfe9defa803fdbfab10ab58b77df242cdb4cedd (diff)
Better encapsulate access to the global object
Change-Id: I8a76112d821cb3fc172ba0d16ee8410d39b4422a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index b4461e32fa..395d33f3c1 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1245,7 +1245,7 @@ void QQmlComponent::createObject(QQmlV4Function *args)
QV4::ScopedValue f(scope, QV4::Script::evaluate(v4, QString::fromLatin1(INITIALPROPERTIES_SOURCE), qmlglobal));
Q_ASSERT(f->asFunctionObject());
QV4::ScopedCallData callData(scope, 2);
- callData->thisObject = v4->globalObject;
+ callData->thisObject = v4->globalObject();
callData->args[0] = object;
callData->args[1] = valuemap;
f->asFunctionObject()->call(callData);
@@ -1399,7 +1399,7 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu
QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(QV8Engine::getV4(v8engine),
QString::fromLatin1(INITIALPROPERTIES_SOURCE), qmlGlobalObj));
QV4::ScopedCallData callData(scope, 2);
- callData->thisObject = v4engine->globalObject;
+ callData->thisObject = v4engine->globalObject();
callData->args[0] = object;
callData->args[1] = valuemap;
f->call(callData);
@@ -1500,7 +1500,7 @@ void QV4::QmlIncubatorObject::setInitialState(QObject *o)
QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(v4, QString::fromLatin1(INITIALPROPERTIES_SOURCE), d()->qmlGlobal.asObject()));
QV4::ScopedCallData callData(scope, 2);
- callData->thisObject = v4->globalObject;
+ callData->thisObject = v4->globalObject();
callData->args[0] = QV4::QObjectWrapper::wrap(v4, o);
callData->args[1] = d()->valuemap;
f->call(callData);