Skip to content

Commit

Permalink
QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Morten242 committed Feb 15, 2024
1 parent 7192b11 commit 1dd89bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corelib/text/qstringconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1dd89bf

Please sign in to comment.