diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-04-30 13:29:54 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-30 23:30:56 +0200 |
commit | 130b579a160e623066d20bf144ca230b721f0461 (patch) | |
tree | 6be43d296a5163ed563a267158a39124bbdeeb04 /src/plugins/platforms/ios/qioseventdispatcher.mm | |
parent | 02e406ac50e7e57ad50d9596e9db1b32639a6a8f (diff) |
iOS: Don't use -1 as magic value for UIDeviceOrientationFaceUp/Down
The check in [QIOSOrientationListener orientationChanged] ensured we
never reported the two unsupported orientations through QPA, but we
were reporting back the orientation through QIOSScreen::orientation()
as well, and that didn't have a guard for -1. This resulted in crashes
in client code that assumed the range of QScreen::orientation() was
defined by the enum, such as the paintedwindow example.
The listener now ignores the two unsupported orientations, which leaves
us at the previous orientation. For the conversion function, we still
have to support all UIDeviceOrientations, so we fall back to portrait
for the two unsupported orientations. In the future we should consider
caching the previous value explicitly, or fall back to the interface
orientation.
Change-Id: Ic19d0ce86b4ddea250ea927d5e8664396b2b68fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioseventdispatcher.mm')
0 files changed, 0 insertions, 0 deletions