Skip to content
Commit a0a11811 authored by Jyrki Gadinger's avatar Jyrki Gadinger 🐾 Committed by Nicolas Fella
Browse files

KColorSchemeWatcherMac: do not use new NSAppearance API on older macOS versions

On macOS versions older than Big Sur (11.0) the
`NSAppearance.currentDrawingAppearance` property does not exist, and
trying to use it will crash the app at runtime.

This commit makes sure the new property is used on Big Sur or newer
macOS releases, and uses the deprecated `NSAppearance.currentAppearance`
property on Mojave (10.14) or newer.  As the light/dark mode switch was
introduced in Mojave, running the app on older releases will always
prefer the light mode.

Tested on macOS 10.15.5 (x86_64) and 13.1 (arm64)

BUG: 463752
(cherry picked from commit c28c8b74)
parent 92e12f18
Loading
Loading
Loading
Pipeline #303978 passed with stage
in 14 minutes and 30 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment