diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 66664f0f2a..d7c166721e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1770,8 +1770,9 @@ QSysInfo::MacVersion QSysInfo::macVersion() { #if defined(Q_OS_OSX) SInt32 gestalt_version; - if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) { - return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2); + if (Gestalt(gestaltSystemVersionMinor, &gestalt_version) == noErr) { + // add 2 because OS X 10.0 is 0x02 in the enum + return QSysInfo::MacVersion(gestalt_version + 2); } #elif defined(Q_OS_IOS) return qt_ios_version(); // qtcore_mac_objc.mm