qt5base-lts/tests/auto
Sona Kurazyan 154573929a Fix setting active window as application's focus widget
When setting the application's focus widget we search for the next
child widget that can hold the focus and call its setFocus() method,
which also updates focus widgets of all its parent wigets.

In case if the focus widget is the active window itself, we only set it
as the application's focus widget, but we don't update the focus widget
of the active window itself. Because of this the focusWidget() method
always results nullptr for the active window. This prevents from setting
the focus back to active window after the focus has changed (for example
after a context menu is closed, as in the bugreport).

Transfer the focus to active window by calling the setFocus() method, as
it is done in case of transferring the focus to any other widget.

Pick-to: 6.0 5.15
Fixes: QTBUG-85846
Change-Id: I91ebf182fd5bb7d451a1186e2f3e38c8d48acc4e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-15 15:22:18 +01:00
..
cmake Remove the qmake project files 2021-01-07 15:32:28 +01:00
concurrent Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
corelib QCache: when overwriting, store the new cost instead of the delta 2021-01-14 10:00:01 +00:00
dbus Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
gui AA_SynthesizeTouchForUnhandledMouseEvents: keep correct coordinates 2021-01-14 19:09:28 +00:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
printsupport Remove the qmake project files 2021-01-07 15:32:28 +01:00
shared Remove most compiler warnings about missing overrides 2020-09-11 00:20:47 +02:00
sql QODBC: Preserve the whole value when using HighPrecision 2021-01-14 07:02:43 +00:00
testlib QTestLib: Show the values of unregistered enums 2021-01-13 16:15:06 +01:00
tools Remove .prev_CMakeLists.txt files 2021-01-12 20:59:13 +01:00
widgets Fix setting active window as application's focus widget 2021-01-15 15:22:18 +01:00
xml tst_qdom: clean-up the code enabled only before Qt 6 2021-01-15 15:22:08 +01:00
CMakeLists.txt CMake: Fix building with -DQT_FEATURE_gui=OFF 2020-09-15 20:05:32 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00