diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-06-24 23:45:22 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 02:23:18 +0200 |
commit | d75a97793a803064bbacf97dca5beb670ad3e0b6 (patch) | |
tree | 60916a8376c0fc1079c54ff5a03e2d7797a8dfe8 /src/corelib/codecs/qbig5codec.cpp | |
parent | 587b80f67dee42bd6231a2cd836dded05e5dfd13 (diff) |
Remove the font codecs
These codecs have only been used for XLFD based fonts.
These are not supported anymore by Qt 5.
Change-Id: I7dc083f2efcd42363b144b24bd62c169d83390cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/codecs/qbig5codec.cpp')
-rw-r--r-- | src/corelib/codecs/qbig5codec.cpp | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/corelib/codecs/qbig5codec.cpp b/src/corelib/codecs/qbig5codec.cpp index 9e0667e7e8..9dfaa46376 100644 --- a/src/corelib/codecs/qbig5codec.cpp +++ b/src/corelib/codecs/qbig5codec.cpp @@ -1932,127 +1932,6 @@ QByteArray QBig5hkscsCodec::convertFromUnicode(const QChar *uc, int len, Convert } - -#ifdef Q_OS_UNIX -QFontBig5Codec::QFontBig5Codec() -{ - //qDebug("QFontBig5Codec::QFontBig5Codec()"); -} - - -QByteArray QFontBig5Codec::_name() -{ - //qDebug("QFontBig5Codec::name() = \"big5-0\""); - return "big5-0"; -} - - -int QFontBig5Codec::_mibEnum() -{ - //qDebug("QFontBig5Codec::mibEnum() = -2026"); - return -2026; -} - - -QString QFontBig5Codec::convertToUnicode(const char* /*chars*/, int /*len*/, ConverterState *) const -{ - return QString(); -} - -QByteArray QFontBig5Codec::convertFromUnicode(const QChar *uc, int len, ConverterState *) const -{ - //qDebug("QFontBig5Codec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut); - QByteArray result; - result.resize(len * 2); - uchar *rdata = (uchar *) result.data(); - const QChar *ucp = uc; - - for (int i = 0; i < len; i++) { - QChar ch(*ucp++); - uchar c[2]; - -#if 0 - if (ch.row() == 0) { - if (ch.cell() == ' ') - ch = QChar(0x3000); - else if (ch.cell() > ' ' && ch.cell() < 127) - ch = QChar(ch.cell()-' ', 255); - } -#endif - if (qt_UnicodeToBig5hkscs(ch.unicode(), c) == 2 && - c[0] >= 0xa1 && c[0] <= 0xf9) { - *rdata++ = c[0]; - *rdata++ = c[1]; - } else { - *rdata++ = 0; - *rdata++ = 0; - } - } - return result; -} - - - -QFontBig5hkscsCodec::QFontBig5hkscsCodec() -{ - //qDebug("QFontBig5hkscsCodec::QFontBig5hkscsCodec()"); -} - - -QByteArray QFontBig5hkscsCodec::_name() -{ - //qDebug("QFontBig5hkscsCodec::name() = \"big5hkscs-0\""); - return "big5hkscs-0"; -} - - -int QFontBig5hkscsCodec::_mibEnum() -{ - //qDebug("QFontBig5hkscsCodec::mibEnum() = -2101"); - return -2101; -} - - -QString QFontBig5hkscsCodec::convertToUnicode(const char* /*chars*/, int /*len*/, ConverterState *) const -{ - return QString(); -} - -QByteArray QFontBig5hkscsCodec::convertFromUnicode(const QChar *uc, int len, ConverterState *) const -{ - //qDebug("QFontBig5hkscsCodec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut); - QByteArray result; - result.resize(len * 2); - uchar *rdata = (uchar *) result.data(); - const QChar *ucp = uc; - - for (int i = 0; i < len; i++) { - QChar ch(*ucp++); - uchar c[2]; - -#if 0 - if (ch.row() == 0) { - if (ch.cell() == ' ') - ch = QChar(0x3000); - else if (ch.cell() > ' ' && ch.cell() < 127) - ch = QChar(ch.cell()-' ', 255); - } -#endif - if (qt_UnicodeToBig5hkscs(ch.unicode(), c) == 2) { - *rdata++ = c[0]; - *rdata++ = c[1]; - } else { - //white square - *rdata++ = 0; - *rdata++ = 0; - } - } - return result; -} - - -#endif // Q_OS_UNIX - /* ====================================================================== */ /* |