summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-02-02 08:00:15 -0800
committerThiago Macieira <thiago.macieira@intel.com>2019-02-27 04:27:45 +0000
commit96404f7ac89244c944adaa7533c6292e7a614311 (patch)
tree9e175d18766f66299940a7abbee6e5281e2e8ed1 /src/corelib/kernel
parent99566f68755449dbabb7345da5b5876e82f159f1 (diff)
Doc: update the note about nested deleteLater()
If you enter a nested event loop, cause a deleteLater(), exit that event loop, then enter a new one, the nesting count will be the same so those are legitimate targets for deletion. Task-number: QTBUG-73432 Change-Id: Id98140e1c2f0426cabbefffd157f975b5e291ccd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qobject.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index b4e885e407..cf838b6947 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2171,8 +2171,10 @@ void QObject::removeEventFilter(QObject *obj)
Note that entering and leaving a new event loop (e.g., by opening a modal
dialog) will \e not perform the deferred deletion; for the object to be
- deleted, the control must return to the event loop from which
- deleteLater() was called.
+ deleted, the control must return to the event loop from which deleteLater()
+ was called. This does not apply to objects deleted while a previous, nested
+ event loop was still running: the Qt event loop will delete those objects
+ as soon as the new nested event loop starts.
\b{Note:} It is safe to call this function more than once; when the
first deferred deletion event is delivered, any pending events for the