qt5base-lts/tests/auto
Volker Hilsheimer e24a4976be QHostInfo: Always post results through the event loop to the receiver
Lookups performed via QHostInfoRunnable must not synchronously call
the user-code's receiver objects, as that would execute user-code in
the wrong thread. Instead, post a metacall event through the event
loop of the receiver object, or the thread that initiated the lookup.

This was done correctly for the trivial cases of empty host name or
cached results, so the code generally existed. By moving it from a
global function into a member function of QHostInfoResult, we can
simply access the required data to construct and post the event.

As we process that posted event, we need to check that the context
object (which is already guarded via QPointer) is still alive, if
we had one in the first place. If we had one, and it's deleted, then
abort.

[ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost
overloads are now called correctly in the thread of the context object.
When used without context object, the thread that initiates the lookup
will run the functor, and is required to run an event loop.

Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033
Fixes: QTBUG-76276
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-26 17:59:47 +02:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake cmake: correct version dependency for qt5_add_big_resources 2019-05-20 12:49:37 +02:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Fix QCborStreamReader not flushing QIODevices due to internal buffering 2019-07-19 12:31:42 -07:00
dbus Add cmdline feature to qmake 2019-02-18 07:12:14 +00:00
gui Generalize image file name @2x suffix handling to higher scale factors 2019-06-14 13:08:56 +02:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake
network QHostInfo: Always post results through the event loop to the receiver 2019-07-26 17:59:47 +02:00
opengl qWaitFor: Prevent being stuck in QCoreApplication::processEvents 2019-01-09 18:10:54 +00:00
other Fix raster paint error in path joins of tightly bending bezier curves 2019-06-14 11:02:35 +02:00
printsupport tst_QPrinter: stabilize qprinter test 2019-01-20 13:39:54 +00:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql Fix a couple of SQL tests 2019-02-19 11:00:19 +00:00
testlib Fix integer overflows in QDeadlineTimer 2019-05-08 17:19:44 +00:00
tools Make moc grok binary literals with digit separators 2019-05-10 18:34:02 +00:00
widgets Remove unused arguments from QWidgetPrivate::create_sys 2019-07-12 14:54:13 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
testserver.pri Postpone testing docker images and files until running 'make check' 2018-08-30 04:06:51 +00:00