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>
This commit is contained in:
Richard Moe Gustavsen 2013-09-17 10:00:08 +02:00 committed by The Qt Project
parent 68b42cd595
commit 2d00d3951d

View File

@ -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