Remove QT3_SUPPORT from corelib/codecs

Change-Id: Ie674be85b64c5816ee0ad4bccc077943b7046136
Reviewed-on: http://codereview.qt.nokia.com/864
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
This commit is contained in:
Lars Knoll 2011-06-28 23:22:01 +02:00 committed by Qt by Nokia
parent 7b46ec1601
commit 369696dc23
2 changed files with 0 additions and 56 deletions

View File

@ -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

View File

@ -134,17 +134,6 @@ protected:
QTextCodec();
virtual ~QTextCodec();
public:
#ifdef QT3_SUPPORT
static QT3_SUPPORT QTextCodec* codecForContent(const char*, int) { return 0; }
static QT3_SUPPORT const char* locale();
static QT3_SUPPORT QTextCodec* codecForName(const char* hint, int) { return codecForName(QByteArray(hint)); }
QT3_SUPPORT QByteArray fromUnicode(const QString& uc, int& lenInOut) const;
QT3_SUPPORT QString toUnicode(const QByteArray&, int len) const;
QT3_SUPPORT QByteArray mimeName() const { return name(); }
static QT3_SUPPORT QTextCodec *codecForIndex(int i) { return codecForName(availableCodecs().value(i)); }
#endif
private:
friend class QTextCodecCleanup;
static QTextCodec *cftr;
@ -165,9 +154,6 @@ public:
~QTextEncoder();
QByteArray fromUnicode(const QString& str);
QByteArray fromUnicode(const QChar *uc, int len);
#ifdef QT3_SUPPORT
QT3_SUPPORT QByteArray fromUnicode(const QString& uc, int& lenInOut);
#endif
bool hasFailure() const;
private:
const QTextCodec *c;