diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-09-17 10:00:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-23 09:20:03 +0200 |
commit | 2d00d3951d9384c848794ac9dd783986165eef8f (patch) | |
tree | 16ce036e8527649d2c3b3807f2fe1f8f83a29639 /src | |
parent | 68b42cd595954b3c1579e30907dc78c181f0701c (diff) |
qios: always auto rotate as specified in Info.plist
Before this patch, we would only rotate if no autoRotationMask was set.
This was a temporary way to lock orientation from code until a better
API for this was in place.
But this causes problems for applications that both wants to auto rotate
but at the same time sets a mask to get QScreen::orientation
updates. So remove this heuristic before application code starts to
depend on it.
Change-Id: Idb54abd471b33afd866322738f4860c57bc9dcf7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/ios/qiosviewcontroller.mm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index 9d3447a2e4..d315b49776 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -58,14 +58,9 @@ -(BOOL)shouldAutorotate { - // For now we assume that if the application doesn't listen to orientation - // updates it means it would like to enable auto-rotation, and vice versa. - if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp)) - return !guiApp->primaryScreen()->orientationUpdateMask(); - else - return YES; // Startup case: QGuiApplication is not ready yet. - - // FIXME: Investigate a proper Qt API for auto-rotation and orientation locking + // Until a proper orientation and rotation API is in place, we always auto rotate. + // If auto rotation is not wanted, you would need to switch it off manually from Info.plist. + return YES; } -(NSUInteger)supportedInterfaceOrientations |