diff options
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index f8e685a..105c673 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -48,6 +48,7 @@ #include <QtCore/qvarlengtharray.h> #include <QtCore/qdebug.h> #include <private/qmlbindingoptimizations_p.h> +#include <private/qscriptdeclarativeclass_p.h> #include <QtDeclarative/qmlinfo.h> QT_BEGIN_NAMESPACE @@ -69,7 +70,7 @@ void QmlContextPrivate::addScript(const QString &script, QObject *scopeObject, QmlEnginePrivate *enginePriv = QmlEnginePrivate::get(engine); QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); - QScriptContext *scriptContext = scriptEngine->pushCleanContext(); + QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); scriptContext->pushScope(enginePriv->contextClass->newContext(q, scopeObject)); QScriptValue scope = scriptEngine->newObject(); |