diff options
-rw-r--r-- | mkspecs/common/macx.conf | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcore_mac.mm | 4 | ||||
-rw-r--r-- | src/gui/platform/darwin/qapplekeymapper.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 14 | ||||
-rw-r--r-- | src/plugins/platforms/ios/quiview.mm | 8 | ||||
-rw-r--r-- | src/plugins/styles/mac/qmacstyle_mac.mm | 4 | ||||
-rw-r--r-- | src/plugins/tls/securetransport/qtls_st.cpp | 4 |
7 files changed, 1 insertions, 37 deletions
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index b5427dd88c..2c1c90fd2b 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -7,7 +7,7 @@ QMAKE_MAC_SDK = macosx QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14 -QT_MAC_SDK_VERSION_MIN = 10.15 +QT_MAC_SDK_VERSION_MIN = 11 QT_MAC_SDK_VERSION_MAX = 12 diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm index b18a7d56ef..f424f92400 100644 --- a/src/corelib/kernel/qcore_mac.mm +++ b/src/corelib/kernel/qcore_mac.mm @@ -335,13 +335,11 @@ QDebug operator<<(QDebug debug, const QCFString &string) #ifdef Q_OS_MACOS bool qt_mac_applicationIsInDarkMode() { -#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) if (__builtin_available(macOS 10.14, *)) { auto appearance = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames: @[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; return [appearance isEqualToString:NSAppearanceNameDarkAqua]; } -#endif return false; } @@ -711,11 +709,9 @@ QMacVersion::VersionTuple QMacVersion::versionsForImage(const mach_header *machH || loadCommand->cmd == LC_VERSION_MIN_TVOS || loadCommand->cmd == LC_VERSION_MIN_WATCHOS) { auto versionCommand = reinterpret_cast<version_min_command *>(loadCommand); return makeVersionTuple(versionCommand->version, versionCommand->sdk, osForLoadCommand(loadCommand->cmd)); -#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13, __IPHONE_11_0, __TVOS_11_0, __WATCHOS_4_0) } else if (loadCommand->cmd == LC_BUILD_VERSION) { auto versionCommand = reinterpret_cast<build_version_command *>(loadCommand); return makeVersionTuple(versionCommand->minos, versionCommand->sdk, osForPlatform(versionCommand->platform)); -#endif } commandCursor += loadCommand->cmdsize; } diff --git a/src/gui/platform/darwin/qapplekeymapper.mm b/src/gui/platform/darwin/qapplekeymapper.mm index dcc51bfca6..2b0335fef4 100644 --- a/src/gui/platform/darwin/qapplekeymapper.mm +++ b/src/gui/platform/darwin/qapplekeymapper.mm @@ -601,7 +601,6 @@ QList<int> QAppleKeyMapper::possibleKeys(const QKeyEvent *event) const API_AVAILABLE(ios(13.4)) Qt::Key QAppleKeyMapper::fromUIKitKey(NSString *keyCode) { static QHash<NSString *, Qt::Key> uiKitKeys = { -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_13_4) { UIKeyInputF1, Qt::Key_F1 }, { UIKeyInputF2, Qt::Key_F2 }, { UIKeyInputF3, Qt::Key_F3 }, @@ -618,7 +617,6 @@ API_AVAILABLE(ios(13.4)) Qt::Key QAppleKeyMapper::fromUIKitKey(NSString *keyCode { UIKeyInputEnd, Qt::Key_End }, { UIKeyInputPageUp, Qt::Key_PageUp }, { UIKeyInputPageDown, Qt::Key_PageDown }, -#endif { UIKeyInputEscape, Qt::Key_Escape }, { UIKeyInputUpArrow, Qt::Key_Up }, { UIKeyInputDownArrow, Qt::Key_Down }, diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 408c9ac403..52f8259f31 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -33,18 +33,6 @@ #include <CoreServices/CoreServices.h> -#if !QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) -@interface NSColor (MojaveForwardDeclarations) -@property (class, strong, readonly) NSColor *selectedContentBackgroundColor NS_AVAILABLE_MAC(10_14); -@property (class, strong, readonly) NSColor *unemphasizedSelectedTextBackgroundColor NS_AVAILABLE_MAC(10_14); -@property (class, strong, readonly) NSColor *unemphasizedSelectedTextColor NS_AVAILABLE_MAC(10_14); -@property (class, strong, readonly) NSColor *unemphasizedSelectedContentBackgroundColor NS_AVAILABLE_MAC(10_14); -@property (class, strong, readonly) NSArray<NSColor *> *alternatingContentBackgroundColors NS_AVAILABLE_MAC(10_14); -// Missing from non-Mojave SDKs, even if introduced in 10.10 -@property (class, strong, readonly) NSColor *linkColor NS_AVAILABLE_MAC(10_10); -@end -#endif - QT_BEGIN_NAMESPACE static QPalette *qt_mac_createSystemPalette() @@ -241,7 +229,6 @@ const char *QCocoaTheme::name = "cocoa"; QCocoaTheme::QCocoaTheme() : m_systemPalette(nullptr) { -#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave) { m_appearanceObserver = QMacKeyValueObserver(NSApp, @"effectiveAppearance", [this] { if (__builtin_available(macOS 10.14, *)) @@ -250,7 +237,6 @@ QCocoaTheme::QCocoaTheme() handleSystemThemeChange(); }); } -#endif m_systemColorObserver = QMacNotificationObserver(nil, NSSystemColorsDidChangeNotification, [this] { diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index cd4e900d89..937de34e28 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -72,11 +72,9 @@ Q_LOGGING_CATEGORY(lcQpaInputEvents, "qt.qpa.input.events") // handled by the UIView. Scroll gestures, even those coming from touch devices, // such as trackpads will still be received as they are not touch events m_scrollGestureRecognizer.allowedTouchTypes = [NSArray array]; -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_13_4) if (@available(ios 13.4, *)) { m_scrollGestureRecognizer.allowedScrollTypesMask = UIScrollTypeMaskAll; } -#endif m_scrollGestureRecognizer.maximumNumberOfTouches = 0; m_lastScrollDelta = CGPointZero; m_lastScrollCursorPos = CGPointZero; @@ -580,7 +578,6 @@ Q_LOGGING_CATEGORY(lcQpaInputEvents, "qt.qpa.input.events") case UIPressTypeMenu: return Qt::Key_Menu; case UIPressTypePlayPause: return Qt::Key_MediaTogglePlayPause; } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_13_4) if (@available(ios 13.4, *)) { NSString *charactersIgnoringModifiers = press.key.charactersIgnoringModifiers; Qt::Key key = QAppleKeyMapper::fromUIKitKey(charactersIgnoringModifiers); @@ -589,7 +586,6 @@ Q_LOGGING_CATEGORY(lcQpaInputEvents, "qt.qpa.input.events") return QAppleKeyMapper::fromNSString(qtModifiers, press.key.characters, charactersIgnoringModifiers, text); } -#endif return Qt::Key_unknown; } @@ -602,10 +598,8 @@ Q_LOGGING_CATEGORY(lcQpaInputEvents, "qt.qpa.input.events") bool handled = false; for (UIPress* press in presses) { Qt::KeyboardModifiers qtModifiers = Qt::NoModifier; -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_13_4) if (@available(ios 13.4, *)) qtModifiers = QAppleKeyMapper::fromUIKitModifiers(press.key.modifierFlags); -#endif QString text; int key = [self mapPressTypeToKey:press withModifiers:qtModifiers text:text]; if (key == Qt::Key_unknown) @@ -725,10 +719,8 @@ Q_LOGGING_CATEGORY(lcQpaInputEvents, "qt.qpa.input.events") ulong qt_timestamp = time_stamp * 1000; Qt::KeyboardModifiers qt_modifierFlags = Qt::NoModifier; -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_13_4) if (@available(ios 13.4, *)) qt_modifierFlags = QAppleKeyMapper::fromUIKitModifiers(recognizer.modifierFlags); -#endif if (recognizer.state == UIGestureRecognizerStateBegan) // locationInView: doesn't return the cursor position at the time of the wheel event, diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index bc62d50d6d..0181e24eb2 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm +++ b/src/plugins/styles/mac/qmacstyle_mac.mm @@ -385,7 +385,6 @@ class AppearanceSync { public: AppearanceSync() { -#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave && !isDarkMode()) { auto requiredAppearanceName = NSApplication.sharedApplication.effectiveAppearance.name; @@ -394,7 +393,6 @@ public: NSAppearance.currentAppearance = [NSAppearance appearanceNamed:requiredAppearanceName]; } } -#endif // QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) } ~AppearanceSync() @@ -2066,7 +2064,6 @@ QMacStyle::QMacStyle() QCoreApplication::sendEvent(o, &event); }); -#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14) Q_D(QMacStyle); // FIXME: Tie this logic into theme change, or even polish/unpolish if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave) { @@ -2077,7 +2074,6 @@ QMacStyle::QMacStyle() d->cocoaControls.clear(); }); } -#endif } QMacStyle::~QMacStyle() diff --git a/src/plugins/tls/securetransport/qtls_st.cpp b/src/plugins/tls/securetransport/qtls_st.cpp index d2e5132752..5f3cf4d9a3 100644 --- a/src/plugins/tls/securetransport/qtls_st.cpp +++ b/src/plugins/tls/securetransport/qtls_st.cpp @@ -315,7 +315,6 @@ void TlsCryptographSecureTransport::continueHandshake() qCDebug(lcSecureTransport) << d->plainTcpSocket() << "connection encrypted"; #endif -#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13_4, __IPHONE_11_0, __TVOS_11_0, __WATCHOS_4_0) // Unlike OpenSSL, Secure Transport does not allow to negotiate protocols via // a callback during handshake. We can only set our list of preferred protocols // (and send it during handshake) and then receive what our peer has sent to us. @@ -350,7 +349,6 @@ void TlsCryptographSecureTransport::continueHandshake() } } } -#endif // QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE if (!renegotiating) emit q->encrypted(); @@ -694,7 +692,6 @@ bool TlsCryptographSecureTransport::initSslContext() return false; } -#if QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13_4, __IPHONE_11_0, __TVOS_11_0, __WATCHOS_4_0) if (__builtin_available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *)) { const auto protocolNames = configuration.allowedNextProtocols(); QCFType<CFMutableArrayRef> cfNames(CFArrayCreateMutable(nullptr, 0, &kCFTypeArrayCallBacks)); @@ -722,7 +719,6 @@ bool TlsCryptographSecureTransport::initSslContext() qCWarning(lcSecureTransport) << "failed to allocate ALPN names array"; } } -#endif // QT_DARWIN_PLATFORM_SDK_EQUAL_OR_ABOVE if (mode == QSslSocket::SslClientMode) { // enable Server Name Indication (SNI) |