diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-01-30 14:23:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-22 14:00:32 +0100 |
commit | 186692f81f2612c3cf3a4090cbf949f2fb1558f8 (patch) | |
tree | e4506e520a88a1c75086516a1edeb1ab2fb4d057 /src/corelib/codecs/qtextcodec.cpp | |
parent | 9d173c92183c30144e8bd4f115b2cd93c3da0d40 (diff) |
Remove custom text codec for C strings.
This setting is extremely harmful, as code cannot know whether or not to expect
it. It also made the behaviour of QString::fromAscii and ::toAscii unintuitive,
and caused a lot of people to make mistakes with it.
Change-Id: I2f429fa7ef93bd75bb93a7f64c56db15b7283388
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/codecs/qtextcodec.cpp')
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 82e5c9a1c3..68866b9000 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1495,35 +1495,7 @@ QString QTextDecoder::toUnicode(const QByteArray &ba) files to be loaded. For details of internationalization, see \l{Internationalization with Qt}. - \sa codecForTr(), setCodecForCStrings() -*/ - - -/*! - \fn QTextCodec* QTextCodec::codecForCStrings() - - Returns the codec used by QString to convert to and from \c{const - char *} and QByteArrays. If this function returns 0 (the default), - QString assumes Latin-1. - - \sa setCodecForCStrings() -*/ - -/*! - \fn void QTextCodec::setCodecForCStrings(QTextCodec *codec) - \nonreentrant - - Sets the codec used by QString to convert to and from \c{const - char *} and QByteArrays. If the \a codec is 0 (the default), - QString assumes Latin-1. - - \warning Some codecs do not preserve the characters in the ASCII - range (0x00 to 0x7F). For example, the Japanese Shift-JIS - encoding maps the backslash character (0x5A) to the Yen - character. To avoid undesirable side-effects, we recommend - avoiding such codecs with setCodecsForCString(). - - \sa codecForCStrings(), setCodecForTr() + \sa codecForTr() */ /*! |