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/text/qstringconverter.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/text/qstringconverter.cpp')
-rw-r--r-- | src/corelib/text/qstringconverter.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index 43ebde6449..d1b3055bd4 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -1115,7 +1115,6 @@ static QString convertToUnicodeCharByChar(const char *chars, qsizetype length, Q state->remainingChars = 0; } const char *mb = mbcs; -#if !defined(Q_OS_WINRT) const char *next = 0; QString s; while ((next = CharNextExA(CP_ACP, mb, 0)) != mb) { @@ -1134,21 +1133,6 @@ static QString convertToUnicodeCharByChar(const char *chars, qsizetype length, Q } mb = next; } -#else - QString s; - size_t size = mbstowcs(NULL, mb, length); - if (size == size_t(-1)) { - Q_ASSERT("Error in CE TextCodec"); - return QString(); - } - wchar_t* ws = new wchar_t[size + 2]; - ws[size +1] = 0; - ws[size] = 0; - size = mbstowcs(ws, mb, length); - for (size_t i = 0; i < size; i++) - s.append(QChar(ws[i])); - delete [] ws; -#endif delete [] mbcs; return s; } |