aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlexpression.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-05-24 12:45:13 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-05-24 12:50:11 +0200
commite598f400d88f21b07e8c50c85e367cacea5a5960 (patch)
tree788a9f0bbfb59a100f490f9bcc73f81fffff9ca6 /src/qml/qml/qqmlexpression.cpp
parentbe4f0622f8c0d89371e9314e2d53c246dd77871b (diff)
Get rid of some v8 based code
Change-Id: Iee910dcc1d3148922d2f92055eb06cdb0b889502 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlexpression.cpp')
-rw-r--r--src/qml/qml/qqmlexpression.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
index 2f2bee6dea..ab22fe6134 100644
--- a/src/qml/qml/qqmlexpression.cpp
+++ b/src/qml/qml/qqmlexpression.cpp
@@ -47,6 +47,7 @@
#include "qqmlcontext_p.h"
#include "qqmlscriptstring_p.h"
#include "qqmlcompiler_p.h"
+#include <private/qv8engine_p.h>
#include <QtCore/qdebug.h>
@@ -259,15 +260,15 @@ void QQmlExpression::setExpression(const QString &expression)
}
// Must be called with a valid handle scope
-v8::Handle<v8::Value> QQmlExpressionPrivate::v8value(bool *isUndefined)
+QV4::Value QQmlExpressionPrivate::v4value(bool *isUndefined)
{
if (!expressionFunctionValid) {
- v8function = qmlBinding(context(), scopeObject(), expression, url, line, &v8qmlscope);
+ function = qmlBinding(context(), scopeObject(), expression, url, line, &qmlscope);
setUseSharedContext(false);
expressionFunctionValid = true;
}
- return evaluate(context(), v8function.value(), isUndefined);
+ return evaluate(context(), function.value(), isUndefined);
}
QVariant QQmlExpressionPrivate::value(bool *isUndefined)
@@ -285,8 +286,8 @@ QVariant QQmlExpressionPrivate::value(bool *isUndefined)
ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation.
{
- v8::Handle<v8::Value> result = v8value(isUndefined);
- rv = ep->v8engine()->toVariant(result->v4Value(), -1);
+ QV4::Value result = v4value(isUndefined);
+ rv = ep->v8engine()->toVariant(result, -1);
}
ep->dereferenceScarceResources(); // "release" scarce resources if top-level expression evaluation is complete.