Details
-
Technical task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
Occurrences of QCoreApplication::processEvents() before QTRY_VERIFY and QTRY_COMPARE are not needed as those macros already spin an event loop, by calling QCoreApplication::processEvents(). The same is true for QTest::qWaitFor{Exposed,Active}(). Possibly there are other similar redundant misuses - cleanup those as well and document good practice to avoid these anti-patterns (see QTBUG-63987).
For easier reviews this should be done in smaller logical chunks - subdirectories /widgets VS /gui VS each tst_* file separately?
With qtbase at 5e71f40a348d71f06e8f48cc0dc0c08b4e2a33e9:
grep -r "processEvents(" qtbase/tests/auto | wc -l
1245
We should also list common places where it is needed to use proccesEvents(), for example in certain cases after directly using QWindowSystemInterface API.