diff options
| author | Axel Spoerl <axel.spoerl@qt.io> | 2025-12-11 12:22:49 +0100 |
|---|---|---|
| committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2025-12-16 22:28:20 +0000 |
| commit | 8bb9531410f69660b31414c5da2feed5ac2b46bb (patch) | |
| tree | 3953e4134eb4abc3e0513d9024e486b313d22c06 /cmake/QtBuildPathsHelpers.cmake | |
| parent | 1b26d0d59b370b3c49ef2c8defe2baf5ffd67c2d (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/QtBuildPathsHelpers.cmake')
0 files changed, 0 insertions, 0 deletions
