diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-08-30 11:23:51 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-09-04 07:05:00 +0000 |
commit | dd944136a253ba40def26046729e5020b179692a (patch) | |
tree | 2f9c4702a4e082be5255a886a94b58936e4074c5 /src/corelib | |
parent | b3f9b2f14863e78acab4fb3883a9982c6bf33226 (diff) |
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>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 6254330d25..66afa52617 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -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. |