qt5base-lts/tests/auto
Axel Spoerl f83ea89622 Implement QWidgetPrivate::focusObject()
QWidgetPrivate::focusObject() always returns nullptr. That has lead to
mismatches between QGuiApplication::focusObject() and
QApplication::focusWidget(), when a widget got focus by the window
system (e.g. mouse click).

This patch implements QWidgetPrivate::focusObject.
It returns the current widget, if it doesn't have a focus proxy.
If it has a focus proxy, it resolves the proxy chain and returns the
deepest focus proxy.
(Note: It does not return QWidget::focusWidget(), because the focus
widget might not yet have been set, when the method is called).

Fixes: QTBUG-92464
Fixes: QTBUG-108522
Pick-to: 6.6 6.5 6.2
Done-With: Liang Qi <liang.qi@qt.io>
Change-Id: Icf01e8ac4fc5f722fbf8e0ca5a562617ae9ae8f2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-06-21 00:30:41 +02:00
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake Bump version to 6.7.0 2023-06-12 14:46:07 +01:00
concurrent QVariant::value/qvariant_cast: add rvalue optimization 2023-06-12 09:58:58 +02:00
corelib QMetaContainer: Allow retrieving the d pointer 2023-06-21 00:04:04 +02:00
dbus QDBus: Transform fallback interface names according to the spec 2023-06-20 19:53:47 +02:00
gui QPixmapCache: don't leak QString keys of evicted pixmap 2023-06-20 15:25:20 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Android: explicitly bundle the OpenSSL libs for tests 2023-06-21 01:04:04 +03:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other macOS: Extend accessibility testing of treeview 2023-05-23 19:42:16 +02:00
printsupport tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql SQL: Make QSqlDatabase::DriverDict creation thread-safe 2023-05-24 17:27:55 +02:00
testlib Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00
tools Moc: fix generated code for nested enum class corner case 2023-06-18 21:28:58 +03:00
wasm Support child windows on WASM 2023-06-15 09:41:06 +02:00
widgets Implement QWidgetPrivate::focusObject() 2023-06-21 00:30:41 +02:00
xml QDomDocument: no longer drop a provided 'standalone' attribute if 'no' 2023-04-24 21:49:29 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00