From dd670a2f3dfaff00016c24468f1f6e66efbcd2c3 Mon Sep 17 00:00:00 2001 From: Alejandro Exojo Date: Tue, 9 Dec 2014 18:21:07 +0100 Subject: 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 --- src/corelib/doc/src/objectmodel/properties.qdoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib/doc') diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc index 8a6c7f53d9..dbdc080dff 100644 --- a/src/corelib/doc/src/objectmodel/properties.qdoc +++ b/src/corelib/doc/src/objectmodel/properties.qdoc @@ -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 -- cgit v1.2.3