equal
deleted
inserted
replaced
141 expressionFunctionMode = SharedContext; |
141 expressionFunctionMode = SharedContext; |
142 expressionFunctionValid = true; |
142 expressionFunctionValid = true; |
143 |
143 |
144 } else { |
144 } else { |
145 |
145 |
146 #if !defined(Q_OS_SYMBIAN) //XXX Why doesn't this work? |
|
147 if (!dd->cachedPrograms.at(progIdx)) { |
146 if (!dd->cachedPrograms.at(progIdx)) { |
148 dd->cachedPrograms[progIdx] = new QScriptProgram(expression, url, line); |
147 dd->cachedPrograms[progIdx] = new QScriptProgram(expression, url, line); |
149 } |
148 } |
150 |
149 |
151 expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx), |
150 expressionFunction = evalInObjectScope(ctxt, me, *dd->cachedPrograms.at(progIdx), |
152 &expressionContext); |
151 &expressionContext); |
153 #else |
|
154 expressionFunction = evalInObjectScope(ctxt, me, expression, &expressionContext); |
|
155 #endif |
|
156 |
152 |
157 expressionFunctionMode = ExplicitContext; |
153 expressionFunctionMode = ExplicitContext; |
158 expressionFunctionValid = true; |
154 expressionFunctionValid = true; |
159 } |
155 } |
160 |
156 |
602 expressionContext = ep->contextClass->newContext(context(), scopeObject); |
598 expressionContext = ep->contextClass->newContext(context(), scopeObject); |
603 scriptContext->pushScope(expressionContext); |
599 scriptContext->pushScope(expressionContext); |
604 scriptContext->pushScope(ep->globalClass->staticGlobalObject()); |
600 scriptContext->pushScope(ep->globalClass->staticGlobalObject()); |
605 |
601 |
606 QDeclarativeRewrite::RewriteBinding rewriteBinding; |
602 QDeclarativeRewrite::RewriteBinding rewriteBinding; |
|
603 rewriteBinding.setName(name); |
607 bool ok = true; |
604 bool ok = true; |
608 const QString code = rewriteBinding(expression, &ok); |
605 const QString code = rewriteBinding(expression, &ok); |
609 if (ok) |
606 if (ok) |
610 expressionFunction = scriptEngine->evaluate(code, url, line); |
607 expressionFunction = scriptEngine->evaluate(code, url, line); |
611 |
608 |