diff options
Diffstat (limited to 'src/corelib/codecs/qwindowscodec.cpp')
-rw-r--r-- | src/corelib/codecs/qwindowscodec.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/codecs/qwindowscodec.cpp b/src/corelib/codecs/qwindowscodec.cpp index e8f7e6f156..813d3c8153 100644 --- a/src/corelib/codecs/qwindowscodec.cpp +++ b/src/corelib/codecs/qwindowscodec.cpp @@ -214,10 +214,12 @@ QByteArray QWindowsLocalCodec::convertFromUnicode(const QChar *ch, int uclen, Co 0, 0, 0, &used_def)); // and try again... } else { + // Fail. Probably can't happen in fact (dwFlags is 0). #ifndef QT_NO_DEBUG - // Fail. - qWarning("WideCharToMultiByte: Cannot convert multibyte text (error %d): %s (UTF-8)", - r, QString(ch, uclen).toLocal8Bit().data()); + // Can't use qWarning(), as it'll recurse to handle %ls + fprintf(stderr, + "WideCharToMultiByte: Cannot convert multibyte text (error %d): %ls\n", + r, reinterpret_cast<const wchar_t*>(QString(ch, uclen).utf16())); #endif break; } |