There is no guarantee that it will return 0 after one call to sendPostedEvents(), since more events may have been posted during that call. This can in turn cause infinite looping since the wait() isn't called. Move sendPostedEvents to the top of processEvents() to make sure we send events before waiting, in line with the implementation for the other event dispatchers. Fixes: QTBUG-112893 Change-Id: Iba7d87cf1c08cd302884782cb135d758afeb9e4b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 9c9aca3b4393a1f1c8169c7b811e46ec5de25df9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%