diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 06:28:22 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 06:28:22 (GMT) |
commit | 47044566c499a702da6cb372044b6402e218835d (patch) | |
tree | d8eb24f0a1635fd46af43039240b13e4908a10bc /src/declarative/qml | |
parent | deb4c5d3253c35875f77a8c70b3a0b0e491e6b86 (diff) | |
download | Qt-47044566c499a702da6cb372044b6402e218835d.zip Qt-47044566c499a702da6cb372044b6402e218835d.tar.gz Qt-47044566c499a702da6cb372044b6402e218835d.tar.bz2 |
Make script and binding assignments identical for list properties
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 8f37a1e..ec84da9 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -355,7 +355,11 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj, QLatin1String(QMetaType::typeName(lastData->propType)); context->throwError(error); } else { - QVariant v = enginePriv->scriptValueToVariant(value, lastData->propType); + QVariant v; + if (lastData->flags & QDeclarativePropertyCache::Data::IsQList) + v = enginePriv->scriptValueToVariant(value, qMetaTypeId<QList<QObject *> >()); + else + v = enginePriv->scriptValueToVariant(value, lastData->propType); if (!value.isVariant() && v.userType() == QMetaType::QVariantList && lastData->propType == qMetaTypeId<QVariant>()) { |