diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-24 05:29:32 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-24 05:29:32 (GMT) |
commit | 40256d682e1a552c9566a744a66cc6fe008b578b (patch) | |
tree | fde8c15bc9a8622daf240638b351c1960ddf0591 /src/declarative/qml | |
parent | 0f93f08d1d2dd8cbaaf80d13244c1b655f122357 (diff) | |
parent | 8848b63187cf1b073891bdd6998273a8869bb033 (diff) | |
download | Qt-40256d682e1a552c9566a744a66cc6fe008b578b.zip Qt-40256d682e1a552c9566a744a66cc6fe008b578b.tar.gz Qt-40256d682e1a552c9566a744a66cc6fe008b578b.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 0593a5d..b6ebd60 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1326,6 +1326,16 @@ int QDeclarativeCompiler::findSignalByName(const QMetaObject *mo, const QByteArr if (methodName == name) return ii; } + + // If no signal is found, but the signal is of the form "onBlahChanged", + // return the notify signal for the property "Blah" + if (name.endsWith("Changed")) { + QByteArray propName = name.mid(0, name.length() - 7); + int propIdx = mo->indexOfProperty(propName.constData()); + if (propIdx >= 0) + return mo->property(propIdx).notifySignalIndex(); + } + return -1; } |