summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2024-02-15 13:42:24 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2024-02-16 00:33:46 +0100
commit1dd89bfb04515bd2e431f8915256a417d622288f (patch)
tree83dd7c55ee38487389aeb3853f46e1b038467c73 /src
parent7192b1184190982b6422196121821838d9fcbba6 (diff)
QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUG
Because there is no other way to stop it from printing the output. Pick-to: 6.7 6.6 6.5 Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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 424a68aa44..ae5a8d8ef3 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);