summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <[email protected]>2024-02-15 13:42:24 +0100
committerQt Cherry-pick Bot <[email protected]>2024-04-12 12:28:20 +0000
commit57f25b705bf2e82e184bec8754b351bdcecc1035 (patch)
treebe6b465e98c1568a04aee4295ffaac68108d7be1 /src
parent52ccb75caf2cc1fd776e62fb4f442c53b91ea762 (diff)
QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUG
Because there is no other way to stop it from printing the output. 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)
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qstringconverter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp
index ec87f0264e2..6ca65ba6ad8 100644
--- a/src/corelib/text/qstringconverter.cpp
+++ b/src/corelib/text/qstringconverter.cpp
@@ -1576,9 +1576,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);