summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlexpression.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-16 06:17:55 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-16 06:17:55 (GMT)
commitdc66752f24442a0bb219a9a4810b47ba4ece3d5c (patch)
tree119c46d96d0bae62d3c7232b34a5d0176b7a1d59 /src/declarative/qml/qmlexpression.cpp
parentf9a0533d2711d3efca48a80f6ff65098039d7b33 (diff)
downloadQt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.zip
Qt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.tar.gz
Qt-dc66752f24442a0bb219a9a4810b47ba4ece3d5c.tar.bz2
Fixes for Symbian.
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r--src/declarative/qml/qmlexpression.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index 76ca2c1..d73d51a 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -109,15 +109,21 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc,
QmlEngine *engine = ctxt->engine();
QmlEnginePrivate *ep = QmlEnginePrivate::get(engine);
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
+#ifndef Q_OS_SYMBIAN //XXX Why doesn't this work?
if (!dd->programs.at(progIdx)) {
- dd->programs[progIdx] =
+ dd->programs[progIdx] =
new QScriptProgram(scriptEngine->compile(data->expression, data->fileName, data->line));
}
+#endif
QScriptContext *scriptContext = scriptEngine->pushCleanContext();
scriptContext->pushScope(ep->contextClass->newContext(ctxt, me));
+#ifndef Q_OS_SYMBIAN
data->expressionFunction = scriptEngine->evaluate(*dd->programs[progIdx]);
+#else
+ data->expressionFunction = scriptEngine->evaluate(data->expression);
+#endif
data->expressionFunctionValid = true;
scriptEngine->popContext();