--- src/gui/osutils/macutils/AppKitImpl.mm +++ src/gui/osutils/macutils/AppKitImpl.mm @@ -66,7 +66,7 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object - change:(NSDictionary *)change + change:(NSDictionary *)change context:(void *)context { Q_UNUSED(object) @@ -80,8 +80,10 @@ }; if(@available(macOS 11.0, *)) { +#if __clang_major__ >= 9 && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 // Not sure why exactly this call is needed, but Apple sample code uses it so it's best to use it here too [NSApp.effectiveAppearance performAsCurrentDrawingAppearance:emitBlock]; +#endif } else { emitBlock(); @@ -139,7 +141,11 @@ // - (bool) isDarkMode { +#if __clang_major__ >= 9 && MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 return [NSApp.effectiveAppearance.name isEqualToString:NSAppearanceNameDarkAqua]; +#else + return false; +#endif }