qt5base-lts/tests/auto
David Faure 23d0c77ce8 QTestLib: flush DeferredDelete events between every test
This makes qtestlib behave more like real Qt applications with an
event loop, where exiting the application does indeed flush deleteLaters.
And since every test method is supposed to be independent from other
test methods, we should even cleanup between tests.

For "app less" tests, no flushing happens.

Real life use cases:

* A unittest for some code (e.g. KIO job) which uses a socket, runs an
event loop until the socket communication is done, and ends. However
slotDisconnected() does, as recommended, socket->deleteLater(). So the
test finishes before the socket has a chance to actually get deleted,
and memory leak tools flag a memory leak, which doesn't actually happen
outside the unittest.

* Deleting a QWebEngineView with deleteLater is even worse than a memleak,
it leads to an assert (from a global object destructor) in QtWebEngine
if the view deletion hasn't actually been processed.

Change-Id: I18fc822fd26988a0fa4e75313c1947fcaa7d9e56
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-10-06 10:43:03 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Update binary compatibility files for Qt 5.9.0 for QtBase 2017-08-14 13:48:17 +00:00
cmake tests: Unify license to GPL-EXCEPT 2017-04-03 07:18:46 +00:00
compilerwarnings/data Updated license headers 2016-01-21 18:55:18 +00:00
concurrent Replace Q_DECL_OVERRIDE with override where possible 2017-09-19 11:53:42 +00:00
corelib Merge remote-tracking branch 'origin/5.10' into dev 2017-09-26 16:14:54 +02:00
dbus Use QSharedPointer::create() more 2017-07-19 13:40:42 +00:00
gui Merge remote-tracking branch 'origin/5.10' into dev 2017-09-26 16:14:54 +02:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake
network Change qrand() to QRandomGenerator in the SSL backend 2017-09-30 18:08:13 +00:00
opengl tst_QGL::graphicsViewClipping: Wait for viewport's window handle 2017-07-17 14:11:06 +00:00
other Replace Q_DECL_OVERRIDE with override where possible 2017-09-19 11:53:42 +00:00
printsupport Convert features.completer to QT_[REQUIRE_]CONFIG 2017-09-04 11:28:02 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql Merge remote-tracking branch 'origin/5.9' into 5.10 2017-09-20 11:58:32 +02:00
testlib QTestLib: flush DeferredDelete events between every test 2017-10-06 10:43:03 +00:00
tools Replace Q_NULLPTR with nullptr where possible 2017-09-19 11:53:55 +00:00
widgets Merge remote-tracking branch 'origin/5.10' into dev 2017-09-26 16:14:54 +02:00
xml Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-01 06:02:55 +01:00
auto.pro Remove remains of wince in .pro files 2017-07-03 05:32:51 +00:00
network-settings.h Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00