diff options
author | Tobias Koenig <tobias.koenig@kdab.com> | 2016-04-13 13:03:12 +0200 |
---|---|---|
committer | Tobias Koenig <tobias.koenig@kdab.com> | 2016-04-14 07:07:19 +0000 |
commit | 479a791ab2696d5c5571c99d1313681dd12d40d0 (patch) | |
tree | bc86c3c6876ffb0015c403aee1ad729c28720a3e /src/corelib | |
parent | 77fb9ca271e515f6a147d3dc7025bf3501c70fa0 (diff) |
Fix QSysInfo::windowsVersion() on WinCE
Use the GetVersionEx method on WinCE. The ntdll.dll does not
exist on that platform, therefor a wrong version number was returned.
Change-Id: I7b51757d0fb612dcd8832e0903a93b9d1c6746c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 461b0f383d..77724d2a0d 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1940,6 +1940,7 @@ static inline OSVERSIONINFO winOsVersion() #define pGetModuleHandle GetModuleHandleW #endif +#ifndef Q_OS_WINCE HMODULE ntdll = pGetModuleHandle(L"ntdll.dll"); if (Q_UNLIKELY(!ntdll)) return result; @@ -1959,6 +1960,10 @@ static inline OSVERSIONINFO winOsVersion() // GetVersionEx() has been deprecated in Windows 8.1 and will return // only Windows 8 from that version on, so use the kernel API function. pRtlGetVersion(&result); // always returns STATUS_SUCCESS +#else // !Q_OS_WINCE + GetVersionEx(&result); +#endif + return result; } |