diff options
author | Mårten Nordheim <[email protected]> | 2024-02-15 13:42:24 +0100 |
---|---|---|
committer | Mårten Nordheim <[email protected]> | 2024-04-09 11:09:55 +0000 |
commit | e69cc7d13ae5412d972c201e16fbc5504a18df59 (patch) | |
tree | 106c315c3526e36eaec8f9a8937e49ae8b54ee8b | |
parent | 7eccff71a6f22a70f0c05a5ead8b2fc9e951c2fc (diff) |
QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUG
Because there is no other way to stop it from printing the output.
Pick-to: 6.5
Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit 1dd89bfb04515bd2e431f8915256a417d622288f)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit d059d5c3cb9dddcc55cf5291cd1b7222169d105b)
-rw-r--r-- | src/corelib/text/qstringconverter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index 4a60d60ae35..91d58b7c40d 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -1575,9 +1575,11 @@ QByteArray QLocal8Bit::convertFromUnicode_sys(QStringView in, quint32 codePage, // incomplete sequence, probably a Windows bug. We try to avoid that from // happening by reducing the window size in that case. But let's keep this // branch just in case of other bugs. +#ifndef QT_NO_DEBUG r = GetLastError(); fprintf(stderr, "WideCharToMultiByte: Cannot convert multibyte text (error %d)\n", r); +#endif // !QT_NO_DEBUG break; } std::tie(out, outlen) = growOut(neededLength); |