diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2012-05-23 20:21:25 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 13:52:59 (GMT) |
commit | af7e859a3fc203613200e6d61d43e214480e2bd3 (patch) | |
tree | bbbf2f2b978944dbf1d167cc5cac442448c848f2 /src/corelib/global | |
parent | 882b8ed172f366b69a206bf6e953e3388f2a8314 (diff) | |
download | Qt-af7e859a3fc203613200e6d61d43e214480e2bd3.zip Qt-af7e859a3fc203613200e6d61d43e214480e2bd3.tar.gz Qt-af7e859a3fc203613200e6d61d43e214480e2bd3.tar.bz2 |
Add OS version detection for windows 8
Based on consumer preview, the internal version is 6.2
backported-from: I9d6ff6c7614f46a20d489e8a8f4aefeb60c547f6
Change-Id: I543148c22cec622ad04e6bf436acd0e66cbf02d2
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index dde8ada..493b2ae 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1740,6 +1740,8 @@ QSysInfo::WinVersion QSysInfo::windowsVersion() winver = QSysInfo::WV_VISTA; } else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 1) { winver = QSysInfo::WV_WINDOWS7; + } else if (osver.dwMajorVersion == 6 && osver.dwMinorVersion == 2) { + winver = QSysInfo::WV_WINDOWS8; } else { qWarning("Qt: Untested Windows version %d.%d detected!", int(osver.dwMajorVersion), int(osver.dwMinorVersion)); @@ -1771,6 +1773,8 @@ QSysInfo::WinVersion QSysInfo::windowsVersion() winver = QSysInfo::WV_VISTA; else if (override == "WINDOWS7") winver = QSysInfo::WV_WINDOWS7; + else if (override == "WINDOWS8") + winver = QSysInfo::WV_WINDOWS8; } #endif diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 15b6afb..c3ff99e 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1569,6 +1569,7 @@ public: WV_2003 = 0x0040, WV_VISTA = 0x0080, WV_WINDOWS7 = 0x0090, + WV_WINDOWS8 = 0x00a0, WV_NT_based = 0x00f0, /* version numbers */ @@ -1578,6 +1579,7 @@ public: WV_5_2 = WV_2003, WV_6_0 = WV_VISTA, WV_6_1 = WV_WINDOWS7, + WV_6_2 = WV_WINDOWS8, WV_CE = 0x0100, WV_CENET = 0x0200, |