qt5base-lts/tests/auto/corelib/kernel/qobject
Paolo Angelelli c5d4972577 Fix for deferredDelete() bug when calling the glib loop directly
This patch makes sure that all events posted using Qt on top of the
GLib event loop have the loopLevel counter incremented.
This is done since Qt depends on the fact that all deleteLater() calls
are issued within the scope of some signal handler (in other words,
triggered by the chain sendEvent() -> notifyInternal2()).
There is a side effect though: in the conditions affected by this
patch, that is deleteLater()s issued within a glib event handler for
example, manually calling processEvents() or sendPostedEvents() with
or without the QEvent::DeferredDelete flag has the same effect, and
deferred deleted events are always processed.
While this is not a currently working feature which the patch breaks,
this side effect seems to be difficult to avoid without separating
sendPostedEvents() and processEvents() into a public and a private
method, in order to detect when they are manually called.
Such change could perhaps be done for Qt6.
An autotest for QTBUG-36434 is also included.
Autotesting for QTBUG-32859 seems to be more challenging in this
respect, due to its dependency on GLib.

Task-number: QTBUG-18434
Task-number: QTBUG-32859
Task-number: QTBUG-36434
Change-Id: Ib89175aa27c9e38bca68ae254d182b2cd21cf7e9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-12 19:06:11 +00:00
..
signalbug Updated license headers 2016-01-21 18:55:18 +00:00
test Merge remote-tracking branch 'origin/5.6' into dev 2015-12-18 08:37:31 +01:00
.gitignore QObject-test: Reorganize subprocess. 2011-12-14 07:07:09 +01:00
BLACKLIST Blacklist and skip various tests that are flakey 2015-06-14 10:50:45 +00:00
qobject.pro Fix compilation for WinRT 2015-12-14 08:43:15 +00:00
tst_qobject.cpp Fix for deferredDelete() bug when calling the glib loop directly 2016-02-12 19:06:11 +00:00