diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-16 10:29:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-27 06:33:27 +0000 |
commit | 0e14a46f60124d9da1101fe7766c7d85e2b72e64 (patch) | |
tree | efb39fcd3950619220bb927c84c174718e38415c /src/qml/qml/qqmlbinding.cpp | |
parent | f8a104432051d182dfc880cea0d4931fcd229204 (diff) |
Move m_function into the base class
Change-Id: I2ebc0ac8f5085157f5d1ec71a1b75559c6a46f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 2110c8a05e..cfcca18d37 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -191,7 +191,7 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) bool isUndefined = false; - QV4::ScopedValue result(scope, QQmlJavaScriptExpression::evaluate(f, &isUndefined)); + QV4::ScopedValue result(scope, QQmlJavaScriptExpression::evaluate(&isUndefined)); bool needsErrorLocationData = false; if (!watcher.wasDeleted() && !hasError()) @@ -225,13 +225,12 @@ void QQmlBinding::update(QQmlPropertyPrivate::WriteFlags flags) QVariant QQmlBinding::evaluate() { QQmlEnginePrivate *ep = QQmlEnginePrivate::get(context()->engine); - QV4::Scope scope(ep->v4engine()); ep->referenceScarceResources(); bool isUndefined = false; - QV4::ScopedValue f(scope, m_function.value()); - QV4::ScopedValue result(scope, QQmlJavaScriptExpression::evaluate(f, &isUndefined)); + QV4::Scope scope(ep->v4engine()); + QV4::ScopedValue result(scope, QQmlJavaScriptExpression::evaluate(&isUndefined)); ep->dereferenceScarceResources(); |