diff options
author | Thiago Macieira <thiago@macieira.org> | 2015-02-11 22:45:49 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 00:19:38 -0800 |
commit | 8a5f4455acd379eef7986fcb30a85ecb19eca929 (patch) | |
tree | d853f8487ffdeeeb20ea4b2a6eb0b1906f0ff514 /subsurfacesysinfo.cpp | |
parent | fd1a33d9357cd1ff615d8008af7e82e75821c939 (diff) | |
download | subsurface-8a5f4455acd379eef7986fcb30a85ecb19eca929.tar.gz |
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>
Diffstat (limited to 'subsurfacesysinfo.cpp')
-rw-r--r-- | subsurfacesysinfo.cpp | 7 |
1 files 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 } } |