qt5base-lts/tests/auto/gui/kernel
Tor Arne Vestbø 4c71db7567 QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last resort
Resetting focus_window and other internal QGuiApplication variables before
calling setVisible(false) and destroying the platform window means that the
platform window can't reason about whether or not it was the focus window
unless it can resolve that using native APIs. We should let the platform
window take care of resetting the focus window and related states, and
only execute our fallback logic if the plugin doesn't do the right
thing.

We also use QPA to update the state instead of modifying the internal
QGuiApplication variables directly, so that events and signals are
emitted as a result of the reset.

The QLineEdit test gets two added calls to processEvents(), since
assuming that activateWindow() is synchronous is not correct, and
would result in the QMenu resetting the focus window to 0 on destroy.

Task-number: QTBUG-46414
Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-01-29 19:29:14 +00:00
..
noqteventloop Allow socket events processing with a foreign event loop on Windows 2016-01-05 13:05:35 +00:00
qbackingstore Update copyright headers 2015-02-11 06:49:51 +00:00
qclipboard don't rely on transitive dependencies 2016-01-08 18:51:02 +00:00
qdrag Update copyright headers 2015-02-11 06:49:51 +00:00
qevent Update copyright headers 2015-02-11 06:49:51 +00:00
qfileopenevent Update copyright headers 2015-02-11 06:49:51 +00:00
qguiapplication Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
qguieventdispatcher QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qguieventloop Stabilize qguieventloop test. 2015-09-24 07:36:25 +00:00
qguimetatype Update copyright headers 2015-02-11 06:49:51 +00:00
qguitimer QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qguivariant Fix conversion QVariant(QColor) to QString. 2015-11-30 12:10:49 +00:00
qinputmethod Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
qkeysequence Replace MAC OS X with OS X 2015-06-30 07:33:31 +00:00
qmouseevent Update copyright headers 2015-02-11 06:49:51 +00:00
qmouseevent_modal Update copyright headers 2015-02-11 06:49:51 +00:00
qopenglwindow tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 08:29:15 +00:00
qpalette Update copyright headers 2015-02-11 06:49:51 +00:00
qpixelformat tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 08:29:15 +00:00
qrasterwindow Update copyright headers 2015-02-11 06:49:51 +00:00
qscreen Update copyright headers 2015-02-11 06:49:51 +00:00
qsurfaceformat Update copyright headers 2015-02-11 06:49:51 +00:00
qtouchevent high-DPI tweaks for autotests 2015-07-30 18:09:12 +00:00
qwindow QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last resort 2016-01-29 19:29:14 +00:00
kernel.pro Allow socket events processing with a foreign event loop on Windows 2016-01-05 13:05:35 +00:00