summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativedom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativedom.cpp')
-rw-r--r--src/declarative/qml/qdeclarativedom.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp
index 6c81f34..cb56ead 100644
--- a/src/declarative/qml/qdeclarativedom.cpp
+++ b/src/declarative/qml/qdeclarativedom.cpp
@@ -374,7 +374,10 @@ QDeclarativeDomValue QDeclarativeDomProperty::value() const
QDeclarativeDomValue rv;
if (d->property) {
rv.d->property = d->property;
- rv.d->value = d->property->values.at(0);
+ if (d->property->values.count())
+ rv.d->value = d->property->values.at(0);
+ else
+ rv.d->value = d->property->onValues.at(0);
rv.d->property->addref();
rv.d->value->addref();
}
@@ -505,7 +508,7 @@ int QDeclarativeDomDynamicProperty::propertyType() const
QByteArray QDeclarativeDomDynamicProperty::propertyTypeName() const
{
- if (isValid())
+ if (isValid())
return d->property.customType;
return QByteArray();
@@ -1181,7 +1184,7 @@ QDeclarativeDomObject QDeclarativeDomValueValueSource::object() const
\qml
Rectangle {
- x: Behavior { NumberAnimation { duration: 500 } }
+ Behavior on x { NumberAnimation { duration: 500 } }
}
\endqml
*/
@@ -1225,7 +1228,7 @@ QDeclarativeDomValueValueInterceptor &QDeclarativeDomValueValueInterceptor::oper
returned.
\qml
Rectangle {
- x: Behavior { NumberAnimation { duration: 500 } }
+ Behavior on x { NumberAnimation { duration: 500 } }
}
\endqml
*/
@@ -1346,7 +1349,7 @@ QDeclarativeDomValue::Type QDeclarativeDomValue::type() const
{
if (d->property)
if (QDeclarativeMetaType::isList(d->property->type) ||
- (d->property && d->property->values.count() > 1))
+ (d->property && (d->property->values.count() + d->property->onValues.count()) > 1))
return List;
QDeclarativeParser::Value *value = d->value;
@@ -1628,6 +1631,13 @@ QList<QDeclarativeDomValue> QDeclarativeDomList::values() const
rv << v;
}
+ for (int ii = 0; ii < d->property->onValues.count(); ++ii) {
+ QDeclarativeDomValue v;
+ v.d->value = d->property->onValues.at(ii);
+ v.d->value->addref();
+ rv << v;
+ }
+
return rv;
}