summaryrefslogtreecommitdiffstats
path: root/cmake/QtTestHelpers.cmake
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2025-12-11 12:22:49 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-12-16 22:28:20 +0000
commit8bb9531410f69660b31414c5da2feed5ac2b46bb (patch)
tree3953e4134eb4abc3e0513d9024e486b313d22c06 /cmake/QtTestHelpers.cmake
parent1b26d0d59b370b3c49ef2c8defe2baf5ffd67c2d (diff)
Fix flakiness tst_QWidget::multipleToplevelFocusCheck()6.11
The test function shows and activates a custom widget with a hidden QLineEdit inside. It used QApplicationPrivate::setActiveWindow() to force-set the active window. It then sent a mouse double click to the custom window, which would subsequently show the line edit, set focus on it and process events. The use of QApplicationPrivate::setActiveWindow() and setting focus to the line edit could cause a race codition, function call overrides the line edit activation and its widget parent gets focus instead. Remove calls to QApplicationPrivate::setActiveWindow(). Wait for the line edit to be focused, before returning from the mouseDoubleClickEvent() override. Unblacklist the test function. As a drive-by: Remove unnecessary casts, optimize setting of window titles and object names. Fixes: QTBUG-64446 Fixes: QTBUG-84259 Pick-to: 6.10 6.8 6.5 Change-Id: I92953942db9c47ec08b7867928853753fd764798 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 39dc9b1d6634f6fbd6be3f80f423afee36e7f79a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
0 files changed, 0 insertions, 0 deletions