From 83645377e98fb1312b6f80a1c996a013b62f0b46 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 16 May 2012 23:09:56 +0200 Subject: 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 --- src/corelib/kernel/qobject.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/kernel/qobject.h') 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 -- cgit v1.2.3