iOS: Enable autorotate on startup.
The qobject_cast to QGuiAppplication will always fail at startup since QGuiApplication is not ready yet. Return YES in that case. Allowed orientations can then be controlled by setting "Supported Interface Orientations" in Xcode or the Info.plist file. Change-Id: Ifd86bbcedabc716e63563bbb7cb0c1c6833fd6c7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
c75bc5b532
commit
fecc155408
@ -63,7 +63,7 @@
|
||||
if (QGuiApplication *guiApp = qobject_cast<QGuiApplication *>(qApp))
|
||||
return !guiApp->primaryScreen()->orientationUpdateMask();
|
||||
else
|
||||
return NO;
|
||||
return YES; // Startup case: QGuiApplication is not ready yet.
|
||||
|
||||
// FIXME: Investigate a proper Qt API for auto-rotation and orientation locking
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user