qt5base-lts/tests/auto
David Faure 3e7463411e Fix crash when the focus widget gets a focus proxy after the fact
QApplicationPrivate::focus_widget became a dangling pointer
in the following scenario:

A widget first gets focus and later on gets a focus proxy.
QApplicationPrivate::focus_widget was still pointing to the initial widget.
Upon destruction, QWidget::hasFocus() [which follows to the focus proxy
and then compares with focus_widget] was therefore false for both
widgets. So QWidget::clearFocus() didn't call
QApplicationPrivate::setFocusWidget(0) for either of them. As a
result, focus_widget remained set, and became dangling.

In real life, this happened with a QWebEngineView, which the application
gave focus to upon creation. At that time it doesn't have a focus proxy
yet. That happens later, in QWebEngineViewPrivate::widgetChanged.

https://bugs.kde.org/show_bug.cgi?id=381793

Change-Id: Ifee610bb76a2d4d2797b98ece9bffe5fffe3c6a6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-29 17:15:02 +02:00
..
android
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake cmake: correct version dependency for qt5_add_big_resources 2019-05-20 12:49:37 +02:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Merge remote-tracking branch 'origin/5.12' into 5.13 2019-07-20 01:00:13 +02:00
dbus Merge remote-tracking branch 'origin/5.12' into 5.13 2019-02-19 01:00:08 +01:00
gui Handle multiple font-families in <font> face attribute 2019-07-03 13:21:14 +02:00
guiapplauncher
installed_cmake
network Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-07-29 15:33:37 +02:00
opengl qWaitFor: Prevent being stuck in QCoreApplication::processEvents 2019-01-09 18:10:54 +00:00
other Merge remote-tracking branch 'origin/5.12' into 5.13 2019-06-20 07:50:44 +02:00
printsupport tst_QPrinter: stabilize qprinter test 2019-01-20 13:39:54 +00:00
shared Make tst_qwidget pass on High-DPI screens (Windows) 2019-06-03 10:41:08 +02:00
sql Merge remote-tracking branch 'origin/5.12' into 5.13 2019-02-21 01:00:08 +01:00
testlib Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-09 13:06:11 +00:00
tools Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-12 01:00:08 +02:00
widgets Fix crash when the focus widget gets a focus proxy after the fact 2019-07-29 17:15:02 +02:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Extend the default retry times of QtNetworkSettings::verifyConnection 2019-01-23 15:28:33 +00:00
testserver.pri Disable Docker-based test servers on macOS temporarily 2019-02-06 22:04:54 +00:00