Merge two simple version of translate() functions for QT_NO_TRANSLATION

the commit 53a420a4d1 merged translate()
functions. The simple versions need to be merged too.

Change-Id: Ie873483beb8ed0b911ae0568e97b427f4c6b74e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Tasuku Suzuki 2012-05-17 04:52:33 +09:00 committed by Qt by Nokia
parent dbcbd4708b
commit bdc28e3580

View File

@ -213,19 +213,6 @@ inline bool QCoreApplication::sendSpontaneousEvent(QObject *receiver, QEvent *ev
{ if (event) event->spont = true; return self ? self->notifyInternal(receiver, event) : false; }
#ifdef QT_NO_TRANSLATION
// Simple versions
inline QString QCoreApplication::translate(const char *, const char *sourceText,
const char *, Encoding encoding)
{
#ifndef QT_NO_TEXTCODEC
if (encoding == UnicodeUTF8)
return QString::fromUtf8(sourceText);
#else
Q_UNUSED(encoding)
#endif
return QString::fromLatin1(sourceText);
}
// Simple versions
inline QString QCoreApplication::translate(const char *, const char *sourceText,
const char *, Encoding encoding, int)