qt5base-lts/tests/auto/corelib/kernel
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
..
qcoreapplication Updated license headers 2016-01-21 18:55:18 +00:00
qeventdispatcher Updated license headers 2016-01-21 18:55:18 +00:00
qeventloop tst_qeventloop: replace select with poll 2016-02-04 22:33:51 +00:00
qmath Updated license headers 2016-01-21 18:55:18 +00:00
qmetaenum Updated license headers 2016-01-21 18:55:18 +00:00
qmetamethod Updated license headers 2016-01-21 18:55:18 +00:00
qmetaobject Updated license headers 2016-01-21 18:55:18 +00:00
qmetaobjectbuilder Updated license headers 2016-01-21 18:55:18 +00:00
qmetaproperty Updated license headers 2016-01-21 18:55:18 +00:00
qmetatype Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
qmimedata Updated license headers 2016-01-21 18:55:18 +00:00
qobject Fix for deferredDelete() bug when calling the glib loop directly 2016-02-12 19:06:11 +00:00
qpointer Updated license headers 2016-01-21 18:55:18 +00:00
qsharedmemory Updated license headers 2016-01-21 18:55:18 +00:00
qsignalblocker Updated license headers 2016-01-21 18:55:18 +00:00
qsignalmapper Updated license headers 2016-01-21 18:55:18 +00:00
qsocketnotifier Updated license headers 2016-01-21 18:55:18 +00:00
qsystemsemaphore Updated license headers 2016-01-21 18:55:18 +00:00
qtimer Add Intel copyright to files that Intel has had non-trivial contribution 2016-01-21 22:44:21 +00:00
qtranslator Updated license headers 2016-01-21 18:55:18 +00:00
qvariant Updated license headers 2016-01-21 18:55:18 +00:00
qwineventnotifier Updated license headers 2016-01-21 18:55:18 +00:00
kernel.pro iOS: Skip tests that don't make sense or don't work on the platform 2015-03-16 14:25:27 +00:00