diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-05-06 15:32:56 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-06 16:00:31 +0200 |
commit | 19c6f620dd35916466c36234231d798f79732ab0 (patch) | |
tree | 25cc4889ae7d971e7a68efbd43f482161934907b /src/qml/qml/qqmlbinding.cpp | |
parent | d8ef02beeea7bda1348ed02cf59b6eae74ffc1ad (diff) |
Convert some v8::Persistent to v4
Change-Id: Ic6613b020dbbb1ee75e2096707d8fb1aa228083d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index da34d06b8c..284a0afdcc 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -112,7 +112,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContext *ctxt) QString code = rewriteBinding(str); m_expression = str.toUtf8(); - v8function = evalFunction(context(), obj, code, QString(), 0); + v4function = evalFunction(context(), obj, code, QString(), 0)->v4Value(); } QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlContext *ctxt) @@ -159,7 +159,7 @@ QQmlBinding::QQmlBinding(const QQmlScriptString &script, QObject *obj, QQmlConte m_lineNumber = scriptPrivate->lineNumber; m_columnNumber = scriptPrivate->columnNumber; - v8function = evalFunction(context(), scopeObject(), code, QString(), m_lineNumber); + v4function = evalFunction(context(), scopeObject(), code, QString(), m_lineNumber)->v4Value(); } QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt) @@ -174,7 +174,7 @@ QQmlBinding::QQmlBinding(const QString &str, QObject *obj, QQmlContextData *ctxt QString code = rewriteBinding(str); m_expression = str.toUtf8(); - v8function = evalFunction(ctxt, obj, code, QString(), 0); + v4function = evalFunction(ctxt, obj, code, QString(), 0)->v4Value(); } QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj, @@ -197,7 +197,7 @@ QQmlBinding::QQmlBinding(const QString &str, bool isRewritten, QObject *obj, m_expression = str.toUtf8(); - v8function = evalFunction(ctxt, obj, code, url, m_lineNumber); + v4function = evalFunction(ctxt, obj, code, url, m_lineNumber)->v4Value(); } /*! @@ -217,12 +217,11 @@ QQmlBinding::QQmlBinding(void *functionPtr, QObject *obj, QQmlContextData *ctxt, QQmlAbstractExpression::setContext(ctxt); setScopeObject(obj); - v8function = qPersistentNew<v8::Function>(*(v8::Handle<v8::Function> *)functionPtr); + v4function = (*(v8::Handle<v8::Function> *)functionPtr)->v4Value(); } QQmlBinding::~QQmlBinding() { - qPersistentDispose(v8function); } void QQmlBinding::setEvaluateFlags(EvaluateFlags flags) @@ -280,7 +279,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) bool isUndefined = false; v8::Local<v8::Value> result = - QQmlJavaScriptExpression::evaluate(context(), v8function, &isUndefined); + QQmlJavaScriptExpression::evaluate(context(), **v4function, &isUndefined); trace.event("writing binding result"); @@ -321,7 +320,7 @@ QVariant QQmlBinding::evaluate() bool isUndefined = false; v8::Local<v8::Value> result = - QQmlJavaScriptExpression::evaluate(context(), v8function, &isUndefined); + QQmlJavaScriptExpression::evaluate(context(), **v4function, &isUndefined); ep->dereferenceScarceResources(); |