From 941184bd642c9627c85c5618c2168cefa7787b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 18 Jul 2018 15:35:44 +0200 Subject: macOS: Forward declare 10.14 NSColors instead of disabling warning Change-Id: I8fc1ba7aac1c8ac86a8cb5d6f864180e0721926f Reviewed-by: Timur Pocheptsov --- src/plugins/platforms/cocoa/qcocoasystemsettings.mm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/cocoa') diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm index 06c0f1adf0..a6cdf4211f 100644 --- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm @@ -45,8 +45,15 @@ #include #include -QT_WARNING_PUSH -QT_WARNING_DISABLE_CLANG("-Wobjc-method-access") +#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 *alternatingContentBackgroundColors NS_AVAILABLE_MAC(10_14); +@end +#endif QT_BEGIN_NAMESPACE @@ -221,5 +228,3 @@ QHash qt_mac_createRolePalettes() } QT_END_NAMESPACE - -QT_WARNING_POP -- cgit v1.2.3