summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qtextcodec.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin+qt@viroteck.net>2012-02-01 00:33:30 +0200
committerQt by Nokia <qt-info@nokia.com>2012-03-06 06:34:52 +0100
commit95fa88abe7441f49b64a0b398e16b04b3b6bdbc9 (patch)
tree249b9e3bbe83e760548437c5dcf8d880f8cb46b9 /src/corelib/codecs/qtextcodec.cpp
parent84ddc063805deaa6e76eeff56076f5f359635073 (diff)
Remove codecForTr().
Similarly to change id I2f429fa7ef93bd75bb93a7f64c56db15b7283388, the capability to arbitrarily alter the encoding of literals is very destructive, especially in a world with libraries and plugins. Change-Id: If0d4cd8dcf89792e39c1984cbde6b036cebfc02f 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.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index f6f0cd8699..13f0ec8ce5 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -145,8 +145,6 @@ static bool destroying_is_ok = false;
#endif
static QTextCodec *localeMapper = 0;
-QTextCodec *QTextCodec::cftr = 0;
-
class QTextCodecCleanup
{
@@ -1463,41 +1461,6 @@ QString QTextDecoder::toUnicode(const QByteArray &ba)
return c->toUnicode(ba.constData(), ba.length(), &state);
}
-
-/*!
- \fn QTextCodec* QTextCodec::codecForTr()
-
- Returns the codec used by QObject::tr() on its argument. If this
- function returns 0 (the default), tr() assumes Latin-1.
-
- \sa setCodecForTr()
-*/
-
-/*!
- \fn void QTextCodec::setCodecForTr(QTextCodec *c)
- \nonreentrant
-
- Sets the codec used by QObject::tr() on its argument to \a c. If
- \a c is 0 (the default), tr() assumes Latin-1.
-
- If the literal quoted text in the program is not in the Latin-1
- encoding, this function can be used to set the appropriate
- encoding. For example, software developed by Korean programmers
- might use eucKR for all the text in the program, in which case the
- main() function might look like this:
-
- \snippet doc/src/snippets/code/src_corelib_codecs_qtextcodec.cpp 3
-
- Note that this is not the way to select the encoding that the \e
- user has chosen. For example, to convert an application containing
- literal English strings to Korean, all that is needed is for the
- English strings to be passed through tr() and for translation
- files to be loaded. For details of internationalization, see
- \l{Internationalization with Qt}.
-
- \sa codecForTr()
-*/
-
/*!
\since 4.4