summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 16:28:22 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-08 16:28:22 +1000
commit47044566c499a702da6cb372044b6402e218835d (patch)
treed8eb24f0a1635fd46af43039240b13e4908a10bc /src/declarative/qml/qdeclarativeobjectscriptclass.cpp
parentdeb4c5d3253c35875f77a8c70b3a0b0e491e6b86 (diff)
Make script and binding assignments identical for list properties
Diffstat (limited to 'src/declarative/qml/qdeclarativeobjectscriptclass.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index 8f37a1eb83..ec84da9392 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>()) {