summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index a0403a0d69..5905f1630e 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -44,6 +44,7 @@
#include "qioswindow.h"
#include <qpa/qwindowsysteminterface.h>
#include "qiosapplicationdelegate.h"
+#include "qiosviewcontroller.h"
#include <sys/sysctl.h>
@@ -141,8 +142,7 @@ QIOSScreen::QIOSScreen(unsigned int screenIndex)
if (isQtApplication()) {
// When in a non-mixed environment, let QScreen follow the current interface orientation:
- UIViewController *controller = [UIApplication sharedApplication].delegate.window.rootViewController;
- setPrimaryOrientation(toQtScreenOrientation(controller.interfaceOrientation));
+ setPrimaryOrientation(toQtScreenOrientation(rootViewController().interfaceOrientation));
}
[pool release];