From 369696dc231450c774a5cc253d061aad2f3b6a19 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 28 Jun 2011 23:22:01 +0200 Subject: Remove QT3_SUPPORT from corelib/codecs Change-Id: Ie674be85b64c5816ee0ad4bccc077943b7046136 Reviewed-on: http://codereview.qt.nokia.com/864 Reviewed-by: Qt Sanity Bot Reviewed-by: Liang Qi --- src/corelib/codecs/qtextcodec.cpp | 42 --------------------------------------- 1 file changed, 42 deletions(-) (limited to 'src/corelib/codecs/qtextcodec.cpp') diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 985f5153ea..00a6a9fc9f 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1427,48 +1427,6 @@ bool QTextCodec::canEncode(const QString& s) const return (state.invalidChars == 0); } -#ifdef QT3_SUPPORT -/*! - Returns a string representing the current language and - sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil. - - \sa QLocale -*/ -const char *QTextCodec::locale() -{ - static char locale[6]; - QByteArray l = QLocale::system().name().toLatin1(); - int len = qMin(l.length(), 5); - memcpy(locale, l.constData(), len); - locale[len] = '\0'; - - return locale; -} - -/*! - \overload -*/ - -QByteArray QTextCodec::fromUnicode(const QString& uc, int& lenInOut) const -{ - QByteArray result = convertFromUnicode(uc.constData(), lenInOut, 0); - lenInOut = result.length(); - return result; -} - -/*! - \overload - - \a a contains the source characters; \a len contains the number of - characters in \a a to use. -*/ -QString QTextCodec::toUnicode(const QByteArray& a, int len) const -{ - len = qMin(a.size(), len); - return convertToUnicode(a.constData(), len, 0); -} -#endif - /*! \overload -- cgit v1.2.3