qt5base-lts/tests/auto
Alex Trotsenko 81408c0e76 QEventDispatcherWin32: avoid livelock in a foreign event loop
According to Windows docs, GetMessage() function retrieves the messages
from the input queue in defined order, where posted messages are
processed ahead of input messages, even if they were posted later.
Therefore, if the application produces a posted event permanently, as
a result of processing that event, user input messages may be blocked
due to hard CPU usage by the application.

It's not a problem, if an internal Qt event loop is running. By calling
sendPostedEvents() on the beginning of processEvents(), we are sending
posted events only once per iteration. However, during execution of
the foreign loop, we should artificially lower the priority of the
WM_QT_SENDPOSTEDEVENTS message in order to enable delivery of other
input messages.

To solve the problem, it is proposed to postpone the
WM_QT_SENDPOSTEDEVENTS message until the message queue becomes empty,
as it works for the internal loop.

Task-number: QTBUG-77464
Change-Id: I8dedb6837c6fc41aa6f497e67ab2352c2b4f3772
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-08-29 09:12:29 +00:00
..
bic/data Add binary compatibility files for Qt5.13.0 for QtBase 2019-08-14 10:29:38 +03:00
cmake CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00
concurrent Introduce QT_NO_LINKED_LIST and mark QtBase (almost) free of it 2019-07-12 14:26:30 +02:00
corelib Merge remote-tracking branch 'origin/dev' into 5.14 2019-08-27 09:45:52 +02:00
dbus unblacklist passing tests 2019-07-08 11:01:42 +00:00
gui QEventDispatcherWin32: avoid livelock in a foreign event loop 2019-08-29 09:12:29 +00:00
guiapplauncher
installed_cmake
network HTTP/2: use a non-default MAX_FRAME_SIZE 2019-08-22 15:36:22 +02:00
opengl Remove dead code from Qt 4 times 2019-08-20 22:27:46 +00:00
other Merge remote-tracking branch 'origin/dev' into 5.14 2019-08-27 09:45:52 +02:00
printsupport Remove the remaining usages of deprecated APIs of qtbase 2019-08-01 06:48:27 +02:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql test: migrate QSqlDatabase test to QRegularExpression 2019-07-29 20:01:24 +02:00
testlib QTestLib: Introduce initMain() to run in main before qApp exists 2019-08-13 19:07:05 +02:00
tools Merge remote-tracking branch 'origin/5.13' into dev 2019-08-16 01:00:33 +02:00
widgets Merge remote-tracking branch 'origin/dev' into 5.14 2019-08-27 09:45:52 +02:00
xml Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h test: migrate QNetworkReply test to QRegularExpression 2019-06-10 16:49:19 +02:00