summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-31 01:33:46 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-31 01:33:46 (GMT)
commit671c3ac47a258a876352a4c4d38937e0fb7034a7 (patch)
tree7f357fd9e9fc4c61e6aaac6c8cd9f35dde49400b
parent4c4ae4815ed5a2c4862aa91ea20201d49dfd0338 (diff)
parent73e6fcd8dcfc1a445ef2030a781dcd6fa73814f8 (diff)
downloadQt-671c3ac47a258a876352a4c4d38937e0fb7034a7.zip
Qt-671c3ac47a258a876352a4c4d38937e0fb7034a7.tar.gz
Qt-671c3ac47a258a876352a4c4d38937e0fb7034a7.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp4
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp13
2 files changed, 11 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 1e8ce91..be02bcb 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -450,10 +450,10 @@ bool QmlMetaProperty::isWritable() const
{
if (propertyCategory() == List || propertyCategory() == QmlList)
return true;
- else if (!d->name.isEmpty() && d->object)
- return d->object->metaObject()->property(d->coreIdx).isWritable();
else if (type() & SignalProperty)
return true;
+ else if (!d->name.isEmpty() && d->object)
+ return d->object->metaObject()->property(d->coreIdx).isWritable();
else
return false;
}
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index bece267..b5e204f 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -195,9 +195,14 @@ void QmlPropertyChangesPrivate::decode()
ds >> data;
if (isScript) {
- QmlExpression *expression = new QmlExpression(qmlContext(q), data.toString(), object);
- expression->setTrackChange(false);
- expressions << qMakePair(name, expression);
+ QmlMetaProperty prop = property(name); //### can we avoid or reuse?
+ if (prop.type() != QmlMetaProperty::SignalProperty) { //binding
+ QmlExpression *expression = new QmlExpression(qmlContext(q), data.toString(), object);
+ expression->setTrackChange(false);
+ expressions << qMakePair(name, expression);
+ } else {
+ properties << qMakePair(name, data); //same as non-script
+ }
} else {
properties << qMakePair(name, data);
}
@@ -287,7 +292,7 @@ QmlPropertyChanges::ActionList QmlPropertyChanges::actions()
if (a.property.propertyType() == QVariant::Url &&
(a.toValue.type() == QVariant::String || a.toValue.type() == QVariant::ByteArray) && !a.toValue.isNull())
- a.toValue.setValue(qmlContext(this)->resolvedUrl(QUrl(a.toValue.toString()))); //### d->object's context?
+ a.toValue.setValue(qmlContext(this)->resolvedUrl(QUrl(a.toValue.toString())));
list << a;
}