summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlpropertychanges.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qmlpropertychanges.cpp')
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index a5a08bc..b07a79f 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -230,17 +230,18 @@ void QmlPropertyChangesPrivate::decode()
ds >> isScript;
ds >> data;
- if (isScript) {
- QmlMetaProperty prop = property(name); //### can we avoid or reuse?
+ QmlMetaProperty prop = property(name); //### better way to check for signal property?
+ if (prop.type() == QmlMetaProperty::SignalProperty) {
QmlExpression *expression = new QmlExpression(qmlContext(q), data.toString(), object);
expression->setTrackChange(false);
- if (prop.type() == QmlMetaProperty::SignalProperty) {
- QmlReplaceSignalHandler *handler = new QmlReplaceSignalHandler;
- handler->property = prop;
- handler->expression = expression;
- signalReplacements << handler;
- } else
- expressions << qMakePair(name, expression);
+ QmlReplaceSignalHandler *handler = new QmlReplaceSignalHandler;
+ handler->property = prop;
+ handler->expression = expression;
+ signalReplacements << handler;
+ } else if (isScript) {
+ QmlExpression *expression = new QmlExpression(qmlContext(q), data.toString(), object);
+ expression->setTrackChange(false);
+ expressions << qMakePair(name, expression);
} else {
properties << qMakePair(name, data);
}