src/gui/kernel/qguifunctions_wince.cpp
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   276     return 0;
   276     return 0;
   277 }
   277 }
   278 
   278 
   279 bool qt_wince_is_windows_mobile_65()
   279 bool qt_wince_is_windows_mobile_65()
   280 {
   280 {
   281     return ((qt_wince_get_version() == 52) && (qt_wince_get_build() > 2000));
   281     const DWORD dwFirstWM65BuildNumber = 21139;
       
   282     OSVERSIONINFO osvi;
       
   283     osvi.dwOSVersionInfoSize = sizeof(osvi);
       
   284     if (!GetVersionEx(&osvi))
       
   285         return false;
       
   286     return osvi.dwMajorVersion > 5
       
   287         || (osvi.dwMajorVersion == 5 && (osvi.dwMinorVersion > 2 ||
       
   288             (osvi.dwMinorVersion == 2 && osvi.dwBuildNumber >= dwFirstWM65BuildNumber)));
   282 }
   289 }
   283 
   290 
   284 bool qt_wince_is_pocket_pc() {
   291 bool qt_wince_is_pocket_pc() {
   285     return qt_wince_is_platform(QString::fromLatin1("PocketPC"));
   292     return qt_wince_is_platform(QString::fromLatin1("PocketPC"));
   286 }
   293 }