diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-09-09 11:21:29 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-09-20 06:46:10 +0000 |
commit | 6616617a8771f4b3e6cece3830c8f9c55b0154c3 (patch) | |
tree | a66e6ae7784c459d491988e8b7bb640af2b57cef /src/plugins/platforms/ios/qiosscreen.mm | |
parent | 8a48d66da999d99dac4e9217542c5f954450ddb4 (diff) |
Replace usages of QSysInfo with QOperatingSystemVersion
Occurrences which should simply be removed entirely (due to always being
true or always being false as a result of the current OS support matrix)
have been left untouched for now.
Change-Id: I86d5a084cb84bc28fefc5191d40924de1439b3de
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index b9c77e9bba..7dd2ce7f6e 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -45,6 +45,7 @@ #include "qiosapplicationdelegate.h" #include "qiosviewcontroller.h" #include "quiview.h" +#include <QtCore/qoperatingsystemversion.h> #include <QtGui/private/qwindow_p.h> @@ -271,7 +272,7 @@ void QIOSScreen::updateProperties() if (m_uiScreen == [UIScreen mainScreen]) { Qt::ScreenOrientation statusBarOrientation = toQtScreenOrientation(UIDeviceOrientation([UIApplication sharedApplication].statusBarOrientation)); - if (QSysInfo::MacintoshVersion < QSysInfo::MV_IOS_8_0) { + if (QOperatingSystemVersion::current() < QOperatingSystemVersion(QOperatingSystemVersion::IOS, 8)) { // On iOS < 8.0 the UIScreen geometry is always in portait, and the system applies // the screen rotation to the root view-controller's view instead of directly to the // screen, like iOS 8 and above does. @@ -299,7 +300,7 @@ void QIOSScreen::updateProperties() if (m_geometry != previousGeometry) { QRectF physicalGeometry; - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_8_0) { + if (QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::IOS, 8)) { // We can't use the primaryOrientation of screen(), as we haven't reported the new geometry yet Qt::ScreenOrientation primaryOrientation = m_geometry.width() >= m_geometry.height() ? Qt::LandscapeOrientation : Qt::PortraitOrientation; @@ -404,7 +405,7 @@ Qt::ScreenOrientation QIOSScreen::nativeOrientation() const { CGRect nativeBounds = #if !defined(Q_OS_TVOS) && QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0) - QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_8_0 ? m_uiScreen.nativeBounds : + QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::IOS, 8) ? m_uiScreen.nativeBounds : #endif m_uiScreen.bounds; |