summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoatheme.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-02 19:35:07 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-03 18:38:18 +0000
commit4dc2bc323c985bdceb27f096dd6c8e7af657bb6b (patch)
tree53273dfa66d4938f6a49583bd469208fbe46b140 /src/plugins/platforms/cocoa/qcocoatheme.mm
parent88e34b0a4636de234cc37410c25f0c1032d99a89 (diff)
macOS: Remove Mojave forward-declarations now that we build with Xcode 10
Change-Id: I8528932f3744fbf3473219b6eeda7c26ac039b67 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoatheme.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index c46df25b66..efe670abed 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -80,12 +80,7 @@
#include <CoreServices/CoreServices.h>
-#if !QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14)
-@interface NSApplication (MojaveForwardDeclarations)
-@property (readonly, strong) NSAppearance *effectiveAppearance NS_AVAILABLE_MAC(10_14);
-@end
-#endif
-
+#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14)
@interface QT_MANGLE_NAMESPACE(QCocoaThemeAppAppearanceObserver) : NSObject
@property (readonly, nonatomic) QCocoaTheme *theme;
- (instancetype)initWithTheme:(QCocoaTheme *)theme;
@@ -124,6 +119,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaThemeAppAppearanceObserver);
self.theme->handleSystemThemeChange();
}
@end
+#endif // QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14)
QT_BEGIN_NAMESPACE
@@ -132,8 +128,10 @@ const char *QCocoaTheme::name = "cocoa";
QCocoaTheme::QCocoaTheme()
: m_systemPalette(nullptr), m_appearanceObserver(nil)
{
+#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14)
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSMojave)
m_appearanceObserver = [[QCocoaThemeAppAppearanceObserver alloc] initWithTheme:this];
+#endif
[[NSNotificationCenter defaultCenter] addObserverForName:NSSystemColorsDidChangeNotification
object:nil queue:nil usingBlock:^(NSNotification *) {