diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-07-06 10:24:20 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-07-06 10:24:20 (GMT) |
commit | 3b6c44f773d293f807784b775f352873c793e75a (patch) | |
tree | d6d8655179b3f74b73f4897007d1dc2983d9a8ac /doc/src | |
parent | f8906a729761203866b100f5cd74e452cc94c451 (diff) | |
download | Qt-3b6c44f773d293f807784b775f352873c793e75a.zip Qt-3b6c44f773d293f807784b775f352873c793e75a.tar.gz Qt-3b6c44f773d293f807784b775f352873c793e75a.tar.bz2 |
qdoc: Simplified code to enable fixing of QTBUG-6340.
Also reworded some of the text for QTBUG-11575.
Task-number: QTBUG-6340, QTBUG-11575
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/extending.qdoc | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 28d4ed4..2fd6fa8 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -423,22 +423,14 @@ signals with the \l {Connections} element. Additionally, if a property is added to a C++ class, all QML elements based on that C++ class will have a \e{value-changed} signal handler -for that property. The name of the signal handler is \e{on<Property -name>Changed}, with the first letter of the property name being upper -cased. - -\note If the NOTIFY signal for the added property is not simply -\c{<property_name>Changed()}, then you will get two equivalent signal -handlers, one because of the signal, one because of the property. For -example, if the property \c{test_property} with NOTIFY signal -\c{testPropChanged()} is added to a C++ class, then QML elements based -on that C++ class will have two signal handlers: -\c{onTest_propertyChanged} because of the property, and -\c{onTestPropChanged} because of the NOTIFY signal. For clarity, we -suggest that for properties exposed to QML in this way, the name of -the NOTIFY signal should be just \c{<property_name>Changed()}, so that -there will be just one signal handler in QML and one naming -convention used. +for that property. The name of the signal handler is +\e{on<Property-name>Changed}, with the first letter of the property +name being upper case. + +\note The QML signal handler will always be named +on<Property-name>Changed, regardless of the name used for the NOTIFY +signal in C++. We recommend using <property-name>Changed() for the +NOTIFY signal in C++. See also \l {Extending types from QML}. |