summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-12-02 02:49:24 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-12-02 02:49:24 (GMT)
commitf25f00210cf528f017c64d2fe6505ef15f9447f7 (patch)
tree9e7c35d2d4d8bd17fcc22a2a7d99c4988e743e23 /src/declarative/qml/qmlexpression.cpp
parentcb70f2096cbc66e6e8b5324e0e9508c788144e7e (diff)
downloadQt-f25f00210cf528f017c64d2fe6505ef15f9447f7.zip
Qt-f25f00210cf528f017c64d2fe6505ef15f9447f7.tar.gz
Qt-f25f00210cf528f017c64d2fe6505ef15f9447f7.tar.bz2
Cleanup cached binding closures
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r--src/declarative/qml/qmlexpression.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index 703fcf5..2239d77 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -117,22 +117,22 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc,
if (isShared) {
- if (!dd->cachedValues.at(progIdx)) {
+ if (!dd->cachedClosures.at(progIdx)) {
QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
scriptContext->pushScope(ep->contextClass->newSharedContext());
- dd->cachedValues[progIdx] = new QScriptValue(scriptEngine->evaluate(data->expression, data->url.toString(), data->line));
+ dd->cachedClosures[progIdx] = new QScriptValue(scriptEngine->evaluate(data->expression, data->url.toString(), data->line));
scriptEngine->popContext();
}
- data->expressionFunction = *dd->cachedValues.at(progIdx);
+ data->expressionFunction = *dd->cachedClosures.at(progIdx);
data->isShared = true;
data->expressionFunctionValid = true;
} else {
#if !defined(Q_OS_SYMBIAN) //XXX Why doesn't this work?
- if (!dd->programs.at(progIdx)) {
- dd->programs[progIdx] =
+ if (!dd->cachedPrograms.at(progIdx)) {
+ dd->cachedPrograms[progIdx] =
new QScriptProgram(data->expression, data->url.toString(), data->line);
}
#endif
@@ -141,7 +141,7 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc,
scriptContext->pushScope(ep->contextClass->newContext(ctxt, me));
#if !defined(Q_OS_SYMBIAN)
- data->expressionFunction = scriptEngine->evaluate(*dd->programs[progIdx]);
+ data->expressionFunction = scriptEngine->evaluate(*dd->cachedPrograms.at(progIdx));
#else
data->expressionFunction = scriptEngine->evaluate(data->expression);
#endif