diff options
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 3 | ||||
-rw-r--r-- | src/declarative/qml/qmlexpression.cpp | 5 |
2 files changed, 5 insertions, 3 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(); diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp index faf9f5a..4e4daf7 100644 --- a/src/declarative/qml/qmlexpression.cpp +++ b/src/declarative/qml/qmlexpression.cpp @@ -47,6 +47,7 @@ #include "QtCore/qdebug.h" #include "qmlcompiler_p.h" #include <QtScript/qscriptprogram.h> +#include <private/qscriptdeclarativeclass_p.h> Q_DECLARE_METATYPE(QList<QObject *>); @@ -117,7 +118,7 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc, } #endif - QScriptContext *scriptContext = scriptEngine->pushCleanContext(); + QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); scriptContext->pushScope(ep->contextClass->newContext(ctxt, me)); #if !defined(Q_OS_SYMBIAN) @@ -305,7 +306,7 @@ QVariant QmlExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUnd if (!data->expressionFunctionValid) { - QScriptContext *scriptContext = scriptEngine->pushCleanContext(); + QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine); scriptContext->pushScope(ep->contextClass->newContext(data->context(), data->me)); if (data->expressionRewritten) { |