diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2013-02-14 19:45:48 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-27 23:56:10 +0100 |
commit | fecc1554080aa58167b8cc7018b2ccd037d05cfe (patch) | |
tree | b44b3238af9e12fce74b33e1407e9d3c7a832361 | |
parent | c75bc5b532479e8dbe6b7f07dcc5f9fcc915f5c7 (diff) |
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>
-rw-r--r-- | src/plugins/platforms/ios/qiosviewcontroller.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index c85058743c..c52bfd7345 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -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 } |