From 8a5f4455acd379eef7986fcb30a85ecb19eca929 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 11 Feb 2015 22:45:49 -0800 Subject: Detect Windows 7 or higher with a numeric comparison Signed-off-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- subsurfacesysinfo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subsurfacesysinfo.cpp b/subsurfacesysinfo.cpp index 2458d2880..5b40d1c8e 100644 --- a/subsurfacesysinfo.cpp +++ b/subsurfacesysinfo.cpp @@ -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 } } -- cgit v1.2.3-70-g09d2