qt5base-lts/tests/auto/gui/kernel
Simon Hausmann ce1f994e9b Fix QScreen::orientation() not always being updated after changing the update orientation mask
The back-end might report screen orientation changes at any point and we
record it in screen.d->orientation. However QScreen::orientation()
returns the orientation filtered according to the mask.

Changing the mask sends a notification to the back-end, which might send
another update as a result of a possible subscription to system services
(accelerometer). However on platforms where no subscription is required, where
the platform plugin ignores the mask and always sends the latest orientation,
we should "simulate" the update by updating the filtered orientation according
to the new mask. The function is cheap to call as it won't emit any signals
unless the orientation actually changes.

This patch also adds missing flush() calls after handleScreenOrientationChange
calls in the tests to ensure that the (synthetic) window system events are
actually delivered to QScreen/QGuiApplication.

Change-Id: Iebdd050f947e658ff5bc388629aa4cb31ab497fe
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2012-09-26 19:55:00 +02:00
..
qbackingstore Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qclipboard Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qdrag Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qevent Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qfileopenevent Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qguiapplication Fix events being processed on application start 2012-09-26 19:54:19 +02:00
qguieventdispatcher Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qguimetatype Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qguitimer Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
qguivariant Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qinputmethod Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qkeysequence Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmouseevent Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qmouseevent_modal Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qpalette Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qscreen Fix QScreen::orientation() not always being updated after changing the update orientation mask 2012-09-26 19:55:00 +02:00
qtouchevent Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qwindow Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
kernel.pro Make gui tests build when widgets aren't available 2012-06-07 00:38:01 +02:00