summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 515732bc68..184743e865 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1438,11 +1438,9 @@ bool QCoreApplication::event(QEvent *e)
This enum type defines the 8-bit encoding of character string
arguments to translate():
- \value CodecForTr The encoding specified by
- QTextCodec::codecForTr() (Latin-1 if none has
- been set).
- \value UnicodeUTF8 UTF-8.
- \value DefaultCodec (Obsolete) Use CodecForTr instead.
+ \value UnicodeUTF8 UTF-8.
+ \value Latin1 Latin-1.
+ \value DefaultCodec Latin-1.
\sa QObject::tr(), QObject::trUtf8(), QString::fromUtf8()
*/
@@ -1617,7 +1615,7 @@ static void replacePercentN(QString *result, int n)
If none of the translation files contain a translation for \a
sourceText in \a context, this function returns a QString
equivalent of \a sourceText. The encoding of \a sourceText is
- specified by \e encoding; it defaults to CodecForTr.
+ specified by \e encoding; it defaults to DefaultCodec.
This function is not virtual. You can use alternative translation
techniques by subclassing \l QTranslator.
@@ -1628,7 +1626,7 @@ static void replacePercentN(QString *result, int n)
so will most likely result in crashes or other undesirable
behavior.
- \sa QObject::tr() installTranslator() QTextCodec::codecForTr()
+ \sa QObject::tr() installTranslator()
*/
@@ -1657,8 +1655,6 @@ QString QCoreApplication::translate(const char *context, const char *sourceText,
#else
if (encoding == UnicodeUTF8)
result = QString::fromUtf8(sourceText);
- else if (QTextCodec::codecForTr() != 0)
- result = QTextCodec::codecForTr()->toUnicode(sourceText);
else
#endif
result = QString::fromLatin1(sourceText);