diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-04-22 17:22:53 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-06-04 09:24:33 +0000 |
commit | 95ea1b1aa8d71889bce87c76bb1a996c0f2b58f4 (patch) | |
tree | 45babb4cd76784359227b27dab1e38a69dcaf2a8 /src/plugins/platforms/ios/qiosviewcontroller.mm | |
parent | 2f01e04d8fef22f3e3401aeffdd5972ed9ebcace (diff) |
Remove all code paths related to unsupported Apple platforms.
Now that the minimum deployment target (and thus SDK) is 10.9 for OS X
and 7.0 for iOS, all code paths affecting platform versions lower than
the aforementioned are removed.
Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios/qiosviewcontroller.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosviewcontroller.mm | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index 77b0716cab..643192797a 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -234,25 +234,6 @@ if (self = [self init]) { m_screen = screen; -#if QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_7_0) - QSysInfo::MacVersion iosVersion = QSysInfo::MacintoshVersion; - - // We prefer to keep the root viewcontroller in fullscreen layout, so that - // we don't have to compensate for the viewcontroller position. This also - // gives us the same behavior on iOS 5/6 as on iOS 7, where full screen layout - // is the only way. - if (iosVersion < QSysInfo::MV_IOS_7_0) - self.wantsFullScreenLayout = YES; - - // Use translucent statusbar by default on iOS6 iPhones (unless the user changed - // the default in the Info.plist), so that windows placed under the stausbar are - // still visible, just like on iOS7. - if (screen->uiScreen() == [UIScreen mainScreen] - && iosVersion >= QSysInfo::MV_IOS_6_0 && iosVersion < QSysInfo::MV_IOS_7_0 - && [UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone - && [UIApplication sharedApplication].statusBarStyle == UIStatusBarStyleDefault) - [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent]; -#endif self.changingOrientation = NO; #ifndef Q_OS_TVOS @@ -316,7 +297,6 @@ #endif } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_6_0) - (NSUInteger)supportedInterfaceOrientations { // As documented by Apple in the iOS 6.0 release notes, setStatusBarOrientation:animated: @@ -327,15 +307,6 @@ // supportedInterfaceOrientations says, which states that the method should not return 0. return [self shouldAutorotate] ? UIInterfaceOrientationMaskAll : 0; } -#endif - -#if QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_6_0) -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - Q_UNUSED(interfaceOrientation); - return [self shouldAutorotate]; -} -#endif - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration { @@ -454,30 +425,16 @@ if (focusWindow->flags() & Qt::MaximizeUsingFullscreenGeometryHint) self.preferredStatusBarStyle = UIStatusBarStyleDefault; else - self.preferredStatusBarStyle = QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0 ? - UIStatusBarStyleLightContent : UIStatusBarStyleBlackTranslucent; - - if (self.preferredStatusBarStyle != oldStatusBarStyle) { - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0) - [self setNeedsStatusBarAppearanceUpdate]; - else - [uiApplication setStatusBarStyle:self.preferredStatusBarStyle]; - } + self.preferredStatusBarStyle = UIStatusBarStyleLightContent; + + if (self.preferredStatusBarStyle != oldStatusBarStyle) + [self setNeedsStatusBarAppearanceUpdate]; bool currentStatusBarVisibility = self.prefersStatusBarHidden; self.prefersStatusBarHidden = focusWindow->windowState() == Qt::WindowFullScreen; if (self.prefersStatusBarHidden != currentStatusBarVisibility) { -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_7_0) - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_7_0) { - [self setNeedsStatusBarAppearanceUpdate]; - } else -#endif - { - [uiApplication setStatusBarHidden:self.prefersStatusBarHidden - withAnimation:self.preferredStatusBarUpdateAnimation]; - } - + [self setNeedsStatusBarAppearanceUpdate]; [self.view setNeedsLayout]; } |