diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-03-30 15:19:21 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-03-30 15:28:49 (GMT) |
commit | 51a59f48f5b92e1c55dae5da0ffa9fbb492abc6b (patch) | |
tree | 00ca2609b25f3a6bb542de56ecc7f587b5ce1b2f | |
parent | 259175c6d55d7add0b25fd552b9dadc256e45def (diff) | |
download | Qt-51a59f48f5b92e1c55dae5da0ffa9fbb492abc6b.zip Qt-51a59f48f5b92e1c55dae5da0ffa9fbb492abc6b.tar.gz Qt-51a59f48f5b92e1c55dae5da0ffa9fbb492abc6b.tar.bz2 |
Explicitely mentioned in the doc that the format string for qDebug,
qWarning and qFatal should be in Latin1.
Reviewed-by: Thiago
-rw-r--r-- | src/corelib/global/qglobal.cpp | 11 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 90020f7..08ecf3c 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2022,7 +2022,8 @@ void qt_message_output(QtMsgType msgType, const char *buf) during compilation. If you pass the function a format string and a list of arguments, - it works in similar way to the C printf() function. + it works in similar way to the C printf() function. The format + should be a Latin-1 string. Example: @@ -2068,7 +2069,8 @@ void qDebug(const char *msg, ...) QT_FATAL_WARNINGS is defined. This function takes a format string and a list of arguments, - similar to the C printf() function. + similar to the C printf() function. The format should be a Latin-1 + string. Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 26 @@ -2106,8 +2108,9 @@ void qWarning(const char *msg, ...) message handler has been installed, the message is printed to stderr. Under Windows, the message is sent to the debugger. - This function takes a format string and a list of arguments, similar - to the C printf() function. + This function takes a format string and a list of arguments, + similar to the C printf() function. The format should be a Latin-1 + string. Example: \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 28 diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 1b29adc..9c637ac 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -4864,7 +4864,8 @@ QString QString::toUpper() const a pointer to a zero-terminated array of unicode characters of type ushort (as returned by QString::utf16()). - \note This function expects a UTF-8 string for %s. + \note This function expects a UTF-8 string for %s and Latin-1 for + the format string. The format string supports most of the conversion specifiers provided by printf() in the standard C++ library. It doesn't |