diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-06-28 23:22:01 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-06-29 15:10:14 +0200 |
commit | 369696dc231450c774a5cc253d061aad2f3b6a19 (patch) | |
tree | b35d6a414ab59e1023135ee97cbffe73c7070134 /src/corelib | |
parent | 7b46ec16017d5b467b2b04e9d7e27ce1cee8659e (diff) |
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>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 42 | ||||
-rw-r--r-- | src/corelib/codecs/qtextcodec.h | 14 |
2 files changed, 0 insertions, 56 deletions
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 diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h index 270e96aaf7..015c0941f2 100644 --- a/src/corelib/codecs/qtextcodec.h +++ b/src/corelib/codecs/qtextcodec.h @@ -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; |