summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-09 08:45:53 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-09 08:45:53 (GMT)
commitf0f2819df0a7f3533c24171f27028c68872437af (patch)
treeabfd34a3045965eeec0d03356b1540e67833601a
parentd2a109be3405eb09b3c87b59f05a541ff8320e63 (diff)
downloadQt-f0f2819df0a7f3533c24171f27028c68872437af.zip
Qt-f0f2819df0a7f3533c24171f27028c68872437af.tar.gz
Qt-f0f2819df0a7f3533c24171f27028c68872437af.tar.bz2
Fix following af454feab24824a7ef2d28794930fb7c227c270f
-rw-r--r--src/declarative/qml/qmlcontext.cpp3
-rw-r--r--src/declarative/qml/qmlexpression.cpp5
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) {