diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-05-16 23:09:56 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-18 21:38:35 +0200 |
commit | 83645377e98fb1312b6f80a1c996a013b62f0b46 (patch) | |
tree | 702d6254af0d6474dd4c504595391087e0c4b1d4 /src/corelib/kernel/qobject.h | |
parent | 9e13d169a4bb7e70473945734846e6fc71be8815 (diff) |
Make QCoreApp::translate and related methods use UTF-8
Deprecate the Encoding enum in QCoreApplication and the
trUtf8() methods. Qt now assumes that source code is
always encoded in UTF-8 to be consistent with QString.
Change-Id: Ic62d6947046dee9be0cbd37f2d2f6976b9e572a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r-- | src/corelib/kernel/qobject.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index bce0c96ac1..c89bb9a833 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -133,9 +133,9 @@ public: #endif #ifdef QT_NO_TRANSLATION static QString tr(const char *sourceText, const char * = 0, int = -1) - { return QString::fromLatin1(sourceText); } -#ifndef QT_NO_TEXTCODEC - static QString trUtf8(const char *sourceText, const char * = 0, int = -1) + { return QString::fromUtf8(sourceText); } +#if QT_DEPRECATED_SINCE(5, 0) + QT_DEPRECATED static QString trUtf8(const char *sourceText, const char * = 0, int = -1) { return QString::fromUtf8(sourceText); } #endif #endif //QT_NO_TRANSLATION |