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/qobjectdefs.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/qobjectdefs.h')
-rw-r--r-- | src/corelib/kernel/qobjectdefs.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 66c19fc428..59ae8f1b59 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -97,19 +97,12 @@ class QString; #endif // QT_NO_META_MACROS #ifndef QT_NO_TRANSLATION -# ifndef QT_NO_TEXTCODEC // full set of tr functions # define QT_TR_FUNCTIONS \ static inline QString tr(const char *s, const char *c = 0, int n = -1) \ { return staticMetaObject.tr(s, c, n); } \ - static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \ - { return staticMetaObject.trUtf8(s, c, n); } -# else -// no QTextCodec, no utf8 -# define QT_TR_FUNCTIONS \ - static inline QString tr(const char *s, const char *c = 0, int n = -1) \ + QT_DEPRECATED static inline QString trUtf8(const char *s, const char *c = 0, int n = -1) \ { return staticMetaObject.tr(s, c, n); } -# endif #else // inherit the ones from QObject # define QT_TR_FUNCTIONS @@ -306,7 +299,6 @@ struct Q_CORE_EXPORT QMetaObject #ifndef QT_NO_TRANSLATION QString tr(const char *s, const char *c, int n = -1) const; - QString trUtf8(const char *s, const char *c, int n = -1) const; #endif // QT_NO_TRANSLATION int methodOffset() const; |