From f0f2819df0a7f3533c24171f27028c68872437af Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 9 Nov 2009 18:45:53 +1000 Subject: Fix following af454feab24824a7ef2d28794930fb7c227c270f --- src/declarative/qml/qmlcontext.cpp | 3 ++- 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 #include #include +#include #include 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 +#include Q_DECLARE_METATYPE(QList); @@ -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) { -- cgit v0.12