From 2d00d3951d9384c848794ac9dd783986165eef8f Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 17 Sep 2013 10:00:08 +0200 Subject: [PATCH] qios: always auto rotate as specified in Info.plist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/ios/qiosviewcontroller.mm | 11 +++-------- 1 file 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(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