Switch to new not deprecated api

SPI_GETPLATFORMTYPE is deprecated as of Windows
Embedded Compact 2013, SPI_GETPLATFORMNAME is a
full replacement. Use this instead because it
produces deprecation messages and slows down
execution.

Task-number: QTBUG-46916
Change-Id: I7f162b488dd0b1aa256c47a9e76358df101e3d0f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
bb10
Andreas Holzammer 2015-06-30 09:25:33 +02:00 committed by Sean Harmer
parent 11370f0a43
commit 69e9459e09
1 changed files with 1 additions and 5 deletions

View File

@ -51,14 +51,10 @@ HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR, LPCWSTR file, LPCWSTR params
}
#endif
#ifndef SPI_GETPLATFORMTYPE
#define SPI_GETPLATFORMTYPE 257
#endif
// Internal Qt -----------------------------------------------------
bool qt_wince_is_platform(const QString &platformString) {
wchar_t tszPlatform[64];
if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0))
if (SystemParametersInfo(SPI_GETPLATFORMNAME, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0))
if (0 == _tcsicmp(reinterpret_cast<const wchar_t *> (platformString.utf16()), tszPlatform))
return true;
return false;