doc: Clarify NOTIFY emission with MEMBER variables

Document that NOTIFY signals should be emitted only when really needed,
and that such is the case with MEMBER variables.

Change-Id: Icc38a0790aa43ffe8f24d124da966b4240a41a6f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Alejandro Exojo 2014-12-09 18:21:07 +01:00 committed by Alejandro Exojo Piqueras
parent f17d7a124f
commit dd670a2f3d
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@
of the property changes.
\c NOTIFY signals for \c MEMBER variables must take zero or one parameter,
which must be of the same type as the property. The parameter will take the
new value of the property.
new value of the property. The \c NOTIFY signal should only be emitted when
the property has really been changed, to avoid bindings being unnecessarily
re-evaluated in QML, for example. Qt emits automatically that signal when
needed for MEMBER properties that do not have an explicit setter.
\li A \c REVISION number is optional. If included, it defines
the property and its notifier signal to be used in a particular