summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-11 23:34:46 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-11 23:34:46 (GMT)
commitba1191f30ff2886b477041092eb40d7d9781b63f (patch)
treeeca7caa9d08e68f0b2d1e9986106e2389d1b1d93
parentda0e40dfefb7fc487a9a775363321e178e529d16 (diff)
downloadQt-ba1191f30ff2886b477041092eb40d7d9781b63f.zip
Qt-ba1191f30ff2886b477041092eb40d7d9781b63f.tar.gz
Qt-ba1191f30ff2886b477041092eb40d7d9781b63f.tar.bz2
Correctly identify signal handlers in PropertyChanges when !isScript.
-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);
}