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:
Thiago Macieira 2015-02-11 22:45:49 -08:00 committed by Dirk Hohndel
parent fd1a33d935
commit 8a5f4455ac

View file

@ -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
}
}