From fc2fab3e08ea577d12166d318863c453e093c2f1 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 1 Mar 2010 12:30:25 +0100 Subject: fix qt_wince_is_windows_mobile_65() This function checked the wrong OS build number. The first Windows mobile 6.5 build is supposed to have build number 21139. Task-number: QTBUG-8418 Reviewed-by: thartman --- src/gui/kernel/qguifunctions_wince.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp index ac4cdc8..f5004b0 100644 --- a/src/gui/kernel/qguifunctions_wince.cpp +++ b/src/gui/kernel/qguifunctions_wince.cpp @@ -278,7 +278,14 @@ int qt_wince_get_version() bool qt_wince_is_windows_mobile_65() { - return ((qt_wince_get_version() == 52) && (qt_wince_get_build() > 2000)); + const DWORD dwFirstWM65BuildNumber = 21139; + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + if (!GetVersionEx(&osvi)) + return false; + return osvi.dwMajorVersion > 5 + || (osvi.dwMajorVersion == 5 && (osvi.dwMinorVersion > 2 || + (osvi.dwMinorVersion == 2 && osvi.dwBuildNumber >= dwFirstWM65BuildNumber))); } bool qt_wince_is_pocket_pc() { -- cgit v0.12