qt5base-lts/tests/auto/gui
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
..
image QImage pixelColor and setPixelColor must use unpremultiplied QColor 2015-12-04 09:54:39 +00:00
itemmodels Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
kernel QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last resort 2016-01-29 19:29:14 +00:00
math3d tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b). 2015-07-31 08:29:15 +00:00
painting Merge remote-tracking branch 'origin/5.5' into 5.6 2015-10-02 16:59:55 +02:00
qopengl Merge remote-tracking branch 'origin/5.5' into 5.6 2016-01-19 10:03:01 +01:00
qopenglconfig Tests: Harmonize code checking on platform name. 2015-09-24 07:49:30 +00:00
text QFont: Fix possible cache misses due to misprepared cache key 2016-01-29 11:24:49 +00:00
util tst_qdesktopservices: Use regular expression to suppress error message. 2015-10-02 09:34:41 +00:00
gui.pro Add qopenglconfig test. 2015-02-02 23:05:41 +00:00