diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-28 05:36:21 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-29 13:14:45 +0200 |
commit | 96d40fd09e4a59feb2cd8898267e6682fee2129d (patch) | |
tree | cde226e9f7699226536b3763f3628c9278a1c1cc /src/qml/qml/qqmlproperty.cpp | |
parent | 1a6dd638b830a5353fb2321b74a57d380539c92d (diff) |
Move more methods on QV8Engine over to use v4 based syntax
Change-Id: I7d3501a2c4cd0d749c7c30b5c60fee12cde58aa4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r-- | src/qml/qml/qqmlproperty.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index b29861c4dc..91effab027 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -1551,7 +1551,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object, return false; } else if (isVarProperty) { if (!result.IsEmpty() && result->IsFunction() - && !result->ToObject()->GetHiddenValue(v8engine->bindingFlagKey()).IsEmpty()) { + && !result->ToObject()->GetHiddenValue(v8::Value::fromV4Value(v8engine->bindingFlagKey())).IsEmpty()) { // we explicitly disallow this case to avoid confusion. Users can still store one // in an array in a var property if they need to, but the common case is user error. expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration.")); @@ -1568,11 +1568,11 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object, writeValueProperty(object, core, QVariant(), context, flags); } else if (type == qMetaTypeId<QJSValue>()) { if (!result.IsEmpty() && result->IsFunction() - && !result->ToObject()->GetHiddenValue(v8engine->bindingFlagKey()).IsEmpty()) { + && !result->ToObject()->GetHiddenValue(v8::Value::fromV4Value(v8engine->bindingFlagKey())).IsEmpty()) { expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration.")); return false; } - writeValueProperty(object, core, QVariant::fromValue(v8engine->scriptValueFromInternal(result)), context, flags); + writeValueProperty(object, core, QVariant::fromValue(v8engine->scriptValueFromInternal(result->v4Value())), context, flags); } else if (isUndefined) { QString errorStr = QLatin1String("Unable to assign [undefined] to "); if (!QMetaType::typeName(type)) @@ -1582,7 +1582,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object, expression->delayedError()->setErrorDescription(errorStr); return false; } else if (result->IsFunction()) { - if (!result->ToObject()->GetHiddenValue(v8engine->bindingFlagKey()).IsEmpty()) + if (!result->ToObject()->GetHiddenValue(v8::Value::fromV4Value(v8engine->bindingFlagKey())).IsEmpty()) expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration.")); else expression->delayedError()->setErrorDescription(QLatin1String("Unable to assign a function to a property of any type other than var.")); |