diff options
Diffstat (limited to 'src/declarative/qml/qmlexpression.cpp')
-rw-r--r-- | src/declarative/qml/qmlexpression.cpp | 8 |
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(); |