mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:23:23 +00:00
Detect Windows 7 or higher with a numeric comparison
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fd1a33d935
commit
8a5f4455ac
1 changed files with 5 additions and 2 deletions
|
@ -473,7 +473,10 @@ QString SubsurfaceSysInfo::osArch()
|
|||
extern "C" {
|
||||
bool isWin7Or8()
|
||||
{
|
||||
QString os = SubsurfaceSysInfo::prettyOsName();
|
||||
return os == "Windows 7" || os.startsWith("Windows 8");
|
||||
#ifdef Q_OS_WIN
|
||||
return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) >= QSysInfo::WV_WINDOWS7;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue