qt5base-lts/tests/auto/widgets/kernel
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
..
qaction Remove the qmake project files 2021-01-07 15:32:28 +01:00
qactiongroup Remove the qmake project files 2021-01-07 15:32:28 +01:00
qapplication Fix setting active window as application's focus widget 2021-01-15 15:22:18 +01:00
qboxlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qformlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qgesturerecognizer Remove the qmake project files 2021-01-07 15:32:28 +01:00
qgridlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qshortcut Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsizepolicy Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstackedlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtooltip Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidget Widgets: fix setTabOrder for QAbstractSpinBox-like widgets 2021-01-14 20:09:43 +01:00
qwidget_window Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetaction Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetmetatype Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwidgetsvariant Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwindowcontainer Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: blacklist a list of failing tests for android 2020-11-04 12:27:49 +02:00