From 96d40fd09e4a59feb2cd8898267e6682fee2129d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 28 Apr 2013 05:36:21 +0200 Subject: Move more methods on QV8Engine over to use v4 based syntax Change-Id: I7d3501a2c4cd0d749c7c30b5c60fee12cde58aa4 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlproperty.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/qml/qml/qqmlproperty.cpp') 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()) { 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.")); -- cgit v1.2.3