Fixed regression when assigning an object binding to an array property.

This commit is contained in:
Erik Verbruggen
2010-04-06 12:56:53 +02:00
parent d160265047
commit e615cf82a5
4 changed files with 30 additions and 8 deletions

View File

@@ -187,6 +187,9 @@ public:
QString typeName() const
{ return m_type; }
bool isList() const
{ return m_isList; }
};
class FakeMetaObject {
@@ -859,6 +862,15 @@ QString QmlObjectValue::propertyType(const QString &propertyName) const
return QString();
}
bool QmlObjectValue::isListProperty(const QString &name) const
{
int idx = _metaObject->propertyIndex(name);
if (idx == -1)
return false;
FakeMetaProperty prop = _metaObject->property(idx);
return prop.isList();
}
bool QmlObjectValue::isEnum(const QString &typeName) const
{
return _metaObject->enumeratorIndex(typeName) != -1;