From 4b6064aef434baf7e382b3994f046a2f96fa7111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 24 Jan 2022 16:01:17 +0100 Subject: [PATCH] QOperatingSystemVersion: fix #if check for macos version check It would check the version regardless of OS, but this macro doesn't exist on non-darwin platforms. Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a Pick-to: 6.3 Change-Id: I7bdc302c85626d410e77bea1eb7aac7fbf1cb679 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- src/corelib/global/qoperatingsystemversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qoperatingsystemversion.h b/src/corelib/global/qoperatingsystemversion.h index e48c499ab9..92e2848e2c 100644 --- a/src/corelib/global/qoperatingsystemversion.h +++ b/src/corelib/global/qoperatingsystemversion.h @@ -201,7 +201,7 @@ public: static constexpr QOperatingSystemVersionBase MacOSHighSierra { QOperatingSystemVersionBase::MacOS, 10, 13 }; static constexpr QOperatingSystemVersionBase MacOSMojave { QOperatingSystemVersionBase::MacOS, 10, 14 }; static constexpr QOperatingSystemVersionBase MacOSCatalina { QOperatingSystemVersionBase::MacOS, 10, 15 }; -#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_11_0) +#if !defined(Q_OS_DARWIN) || QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_11_0) static constexpr QOperatingSystemVersionBase MacOSBigSur = { QOperatingSystemVersionBase::MacOS, 11, 0 }; static constexpr QOperatingSystemVersionBase MacOSMonterey = { QOperatingSystemVersionBase::MacOS, 12, 0 }; #else // ### Qt 7: Verify the assumption