diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2020-06-05 09:24:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-06-06 20:25:49 +0200 |
commit | 45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch) | |
tree | 363dfd46575d147206267d854ce14747157f432e /src/corelib/kernel/qsystemerror.cpp | |
parent | aa81b90738ce9faee5e433617c8bd243cb238729 (diff) |
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/kernel/qsystemerror.cpp')
-rw-r--r-- | src/corelib/kernel/qsystemerror.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/corelib/kernel/qsystemerror.cpp b/src/corelib/kernel/qsystemerror.cpp index a735e12925..6a250f5f3a 100644 --- a/src/corelib/kernel/qsystemerror.cpp +++ b/src/corelib/kernel/qsystemerror.cpp @@ -76,7 +76,6 @@ namespace { static QString windowsErrorString(int errorCode) { QString ret; -#ifndef Q_OS_WINRT wchar_t *string = 0; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, NULL, @@ -87,17 +86,6 @@ static QString windowsErrorString(int errorCode) NULL); ret = QString::fromWCharArray(string); LocalFree((HLOCAL)string); -#else - wchar_t errorString[1024]; - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - errorCode, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPWSTR)&errorString, - sizeof(errorString)/sizeof(wchar_t), - NULL); - ret = QString::fromWCharArray(errorString); -#endif // Q_OS_WINRT if (ret.isEmpty() && errorCode == ERROR_MOD_NOT_FOUND) ret = QString::fromLatin1("The specified module could not be found."); |