summaryrefslogtreecommitdiffstats
path: root/subsurfacesysinfo.cpp
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2015-02-11 22:45:49 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 00:19:38 -0800
commit8a5f4455acd379eef7986fcb30a85ecb19eca929 (patch)
treed853f8487ffdeeeb20ea4b2a6eb0b1906f0ff514 /subsurfacesysinfo.cpp
parentfd1a33d9357cd1ff615d8008af7e82e75821c939 (diff)
downloadsubsurface-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.cpp7
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
}
}