QSysInfo::prettyProductName(): add missing macOS product names
Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I9163917187b7a4cbf48e443303313b25473b229f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
8a0e0f8cc1
commit
870cfa4e17
@ -1993,6 +1993,11 @@ QT_END_INCLUDE_NAMESPACE
|
|||||||
static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSystemVersion::current())
|
static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSystemVersion::current())
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
|
if (version.majorVersion() == 12)
|
||||||
|
return "Monterey";
|
||||||
|
// Compare against predefined constant to handle 10.16/11.0
|
||||||
|
if (QOperatingSystemVersion::MacOSBigSur.version().isPrefixOf(version.version()))
|
||||||
|
return "Big Sur";
|
||||||
if (version.majorVersion() == 10) {
|
if (version.majorVersion() == 10) {
|
||||||
switch (version.minorVersion()) {
|
switch (version.minorVersion()) {
|
||||||
case 9:
|
case 9:
|
||||||
@ -2007,13 +2012,15 @@ static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSyst
|
|||||||
return "High Sierra";
|
return "High Sierra";
|
||||||
case 14:
|
case 14:
|
||||||
return "Mojave";
|
return "Mojave";
|
||||||
|
case 15:
|
||||||
|
return "Catalina";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// unknown, future version
|
// unknown, future version
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(version);
|
Q_UNUSED(version);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2107,7 +2114,7 @@ static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSyst
|
|||||||
}
|
}
|
||||||
#undef Q_WINVER
|
#undef Q_WINVER
|
||||||
// unknown, future version
|
// unknown, future version
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user