aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index 1075b53c5e..96f303dcb5 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -1427,7 +1427,8 @@ bool QQmlPropertyPrivate::write(QObject *object,
list << value.toInt();
v = QVariant::fromValue<QList<int> >(list);
ok = true;
- } else if (variantType == QVariant::Double && propertyType == qMetaTypeId<QList<qreal> >()) {
+ } else if ((variantType == QVariant::Double || variantType == QVariant::Int)
+ && (propertyType == qMetaTypeId<QList<qreal> >())) {
QList<qreal> list;
list << value.toReal();
v = QVariant::fromValue<QList<qreal> >(list);
@@ -1533,7 +1534,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
return false;
} else if (isVarProperty) {
QV4::FunctionObject *f = result->asFunctionObject();
- if (f && f->bindingKeyFlag) {
+ if (f && f->bindingKeyFlag()) {
// 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."));
@@ -1551,7 +1552,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
writeValueProperty(object, core, QVariant(), context, flags);
} else if (type == qMetaTypeId<QJSValue>()) {
QV4::FunctionObject *f = result->asFunctionObject();
- if (f && f->bindingKeyFlag) {
+ if (f && f->bindingKeyFlag()) {
expression->delayedError()->setErrorDescription(QLatin1String("Invalid use of Qt.binding() in a binding declaration."));
expression->delayedError()->setErrorObject(object);
return false;
@@ -1569,7 +1570,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object,
expression->delayedError()->setErrorObject(object);
return false;
} else if (QV4::FunctionObject *f = result->asFunctionObject()) {
- if (f->bindingKeyFlag)
+ if (f->bindingKeyFlag())
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."));