summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2012-12-18 12:50:50 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-27 23:55:56 +0100
commitb960424195634c00673d499e4719ccb4f8704ad0 (patch)
tree92dbe82a5ce08f2392423258f0176d7d157587a2 /src/plugins/platforms/ios/qiosscreen.mm
parent5abe9aa435c316b845f4cf5f6a930eefd449f4e1 (diff)
iOS: add global function 'isQtApplication'
Several places in the code we need to check if the plugin is running as a cross-platform Qt application or inside a native app. So we refactor this function to qiosglobal so we can access it from everywhere. Change-Id: I78db0dcde71b7d281868ce304867c8f876caef2a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 87ddc63f4a..fdf2f31ea1 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -139,7 +139,7 @@ QIOSScreen::QIOSScreen(unsigned int screenIndex)
const qreal millimetersPerInch = 25.4;
m_physicalSize = QSizeF(m_geometry.size()) / unscaledDpi * millimetersPerInch;
- if ([[UIApplication sharedApplication].delegate isKindOfClass:[QIOSApplicationDelegate class]]) {
+ 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));