Go to file
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
bin Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
config.tests Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
dist QFileSystemModel: fix permission mangling 2012-09-26 04:03:41 +02:00
doc Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
examples Fix compilation for Qt5: Avoid deprecated API 2012-09-26 18:52:14 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs CMake: Fix the generated location of static libraries. 2012-09-26 10:08:59 +02:00
qmake qmake: fix overescaped defines in vcxproj files 2012-09-26 19:12:31 +02:00
src Fix QScreen::orientation() not always being updated after changing the update orientation mask 2012-09-26 19:55:00 +02:00
tests Fix QScreen::orientation() not always being updated after changing the update orientation mask 2012-09-26 19:55:00 +02:00
tools Introduce an option to disable stripping during installation 2012-09-24 21:27:51 +02:00
util Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Updated .gitignore 2012-08-18 13:59:11 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure configure: Document the -widgets, -no-widgets arguments 2012-09-26 10:08:59 +02:00
configure.bat Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.BSD Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.FDL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.LGPL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
header.LGPL-ONLY Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
INSTALL Remove Symbian specific code from qtbase. 2012-01-31 07:08:31 +01:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.PREVIEW.COMMERCIAL Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtbase.pro Install right version of tools when x-compiling. 2012-07-17 12:52:48 +02:00
sync.profile Revert "Move QWindowSystemInterface out of qpa." 2012-08-03 00:38:09 +02:00