QObject: Document order of events on destruction

Weak pointers are zeroed before destroyed() is emitted. This makes sense
because the signal is called "destroyed()", not "aboutToBeDestroyed()",
and the code has been like this for a long time.

Change-Id: Ic852fe354405e328d1922a75931e7eb7bf651b26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ulf Hermann 2018-08-30 11:23:51 +02:00
parent b3f9b2f148
commit dd944136a2

View File

@ -2142,7 +2142,8 @@ void QObject::removeEventFilter(QObject *obj)
\fn void QObject::destroyed(QObject *obj)
This signal is emitted immediately before the object \a obj is
destroyed, and can not be blocked.
destroyed, after any instances of QPointer have been notified,
and can not be blocked.
All the objects's children are destroyed immediately after this
signal is emitted.