From 41bb408dde90e755b07cd2ab8a9bdec7548c84b0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 28 Feb 2012 22:31:39 -0600 Subject: Automated conversion from qt3 --- src/codecs/qbig5codec.cpp | 64 ++++++++++++++++++++-------------------- src/codecs/qeucjpcodec.cpp | 12 ++++---- src/codecs/qeuckrcodec.cpp | 10 +++---- src/codecs/qfontcncodec.cpp | 36 +++++++++++----------- src/codecs/qfonthkcodec.cpp | 16 +++++----- src/codecs/qfonttwcodec.cpp | 16 +++++----- src/codecs/qgb18030codec.cpp | 60 ++++++++++++++++++------------------- src/codecs/qjiscodec.cpp | 10 +++---- src/codecs/qjpunicode.cpp | 30 +++++++++---------- src/codecs/qrtlcodec.cpp | 12 ++++---- src/codecs/qsjiscodec.cpp | 10 +++---- src/codecs/qtextcodec.cpp | 42 +++++++++++++------------- src/codecs/qtextcodecfactory.cpp | 4 +-- src/codecs/qtsciicodec.cpp | 2 +- 14 files changed, 162 insertions(+), 162 deletions(-) (limited to 'src/codecs') diff --git a/src/codecs/qbig5codec.cpp b/src/codecs/qbig5codec.cpp index efb90ff39..49ebce4e7 100644 --- a/src/codecs/qbig5codec.cpp +++ b/src/codecs/qbig5codec.cpp @@ -531,7 +531,7 @@ static int qt_UnicodeToBig5(ushort ch, uchar *buf) int TQBig5Codec::mibEnum() const { /* See http://www.iana.org/assignments/character-sets */ - //qDebug("TQBig5Codec::mibEnum() = 2026"); + //tqDebug("TQBig5Codec::mibEnum() = 2026"); return 2026; } @@ -539,7 +539,7 @@ int TQBig5Codec::mibEnum() const /*! \reimp */ const char* TQBig5Codec::name() const { - //qDebug("TQBig5Codec::name() = \"Big5\""); + //tqDebug("TQBig5Codec::name() = \"Big5\""); return "Big5"; } @@ -554,7 +554,7 @@ public: TQString toUnicode(const char* chars, int len) { - //qDebug("TQBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); + //tqDebug("TQBig5Decoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len); TQString result; for (int i=0; i 0) || (simpleHeuristicNameMatch(p, "x-euc-jp") > 0)) { return score + 4; } // there exists ja_JP.EUC, ko_KR.EUC, zh_CN.EUC and zh_TW.EUC // so "euc" may or may not be Japanese EUC. - if (qstricmp(p, "euc") == 0 && ja) { + if (tqstricmp(p, "euc") == 0 && ja) { return score + 4; } } diff --git a/src/codecs/qeuckrcodec.cpp b/src/codecs/qeuckrcodec.cpp index 547c00e80..433f4b8bd 100644 --- a/src/codecs/qeuckrcodec.cpp +++ b/src/codecs/qeuckrcodec.cpp @@ -212,11 +212,11 @@ int TQEucKrCodec::heuristicNameMatch(const char* hint) const { int score = 0; bool ko = FALSE; - if (qstrnicmp(hint, "ko_KR", 5) == 0 || - qstrnicmp(hint, "korean", 5) == 0) { + if (tqstrnicmp(hint, "ko_KR", 5) == 0 || + tqstrnicmp(hint, "korean", 5) == 0) { score += 3; ko = TRUE; - } else if (qstrnicmp(hint, "ko", 2) == 0) { + } else if (tqstrnicmp(hint, "ko", 2) == 0) { score += 2; ko = TRUE; } @@ -231,10 +231,10 @@ int TQEucKrCodec::heuristicNameMatch(const char* hint) const p = hint; } if (p) { - if (qstricmp(p, "eucKR") == 0) { + if (tqstricmp(p, "eucKR") == 0) { return score + 4; } - else if (qstricmp(p, "euc") == 0 && ko) { + else if (tqstricmp(p, "euc") == 0 && ko) { return score + 4; } } diff --git a/src/codecs/qfontcncodec.cpp b/src/codecs/qfontcncodec.cpp index 378dd4300..f4d5fc327 100644 --- a/src/codecs/qfontcncodec.cpp +++ b/src/codecs/qfontcncodec.cpp @@ -55,20 +55,20 @@ int TQFontGb2312Codec::heuristicContentMatch(const char *, int) const TQFontGb2312Codec::TQFontGb2312Codec() { - //qDebug("TQFontGb2312Codec::TQFontGb2312Codec()"); + //tqDebug("TQFontGb2312Codec::TQFontGb2312Codec()"); } const char* TQFontGb2312Codec::name() const { - //qDebug("TQFontGb2312Codec::name() = \"gb2312.1980-0\""); + //tqDebug("TQFontGb2312Codec::name() = \"gb2312.1980-0\""); return "gb2312.1980-0"; } int TQFontGb2312Codec::mibEnum() const { - //qDebug("TQFontGb2312Codec::mibEnum() = 57"); + //tqDebug("TQFontGb2312Codec::mibEnum() = 57"); return 57; } @@ -93,7 +93,7 @@ TQCString TQFontGb2312Codec::fromUnicode(const TQString& uc, int& lenInOut ) con uchar *rdata = (uchar *) result.data(); const TQChar *ucp = uc.unicode(); - //qDebug("TQFontGb2312Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQFontGb2312Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); for ( int i = 0; i < lenInOut; i++ ) { TQChar ch(*ucp++); uchar buf[8]; @@ -137,7 +137,7 @@ bool TQFontGb2312Codec::canEncode( TQChar ch ) const { uchar buf[4]; int len = qt_UnicodeToGbk( ch.unicode(), buf ); - //qDebug("TQFontGb2312Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); + //tqDebug("TQFontGb2312Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); return ( len == 2 && buf[0] > 0xa0 && buf[1] > 0xa0 ); } @@ -152,29 +152,29 @@ int TQFontGbkCodec::heuristicContentMatch(const char *, int) const int TQFontGbkCodec::heuristicNameMatch(const char* hint) const { - //qDebug("TQFontGbkCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); - return ( qstricmp(hint, "gbk-0") == 0 || - qstricmp(hint, "gb18030.2000-0") == 0 ) + //tqDebug("TQFontGbkCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); + return ( tqstricmp(hint, "gbk-0") == 0 || + tqstricmp(hint, "gb18030.2000-0") == 0 ) ? 13 : 0; } TQFontGbkCodec::TQFontGbkCodec() { - //qDebug("TQFontGbkCodec::TQFontGbkCodec()"); + //tqDebug("TQFontGbkCodec::TQFontGbkCodec()"); } const char* TQFontGbkCodec::name() const { - //qDebug("TQFontGbkCodec::name() = \"gbk-0\""); + //tqDebug("TQFontGbkCodec::name() = \"gbk-0\""); return "gbk-0"; } int TQFontGbkCodec::mibEnum() const { - //qDebug("TQFontGbkCodec::mibEnum() = -113"); + //tqDebug("TQFontGbkCodec::mibEnum() = -113"); return -113; } @@ -199,7 +199,7 @@ TQCString TQFontGbkCodec::fromUnicode(const TQString& uc, int& lenInOut ) const uchar *rdata = (uchar *) result.data(); const TQChar *ucp = uc.unicode(); - //qDebug("TQFontGbkCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQFontGbkCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); for ( int i = 0; i < lenInOut; i++ ) { TQChar ch(*ucp++); uchar buf[8]; @@ -236,7 +236,7 @@ bool TQFontGbkCodec::canEncode( TQChar ch ) const return TRUE; uchar buf[4]; int len = qt_UnicodeToGbk( ch.unicode(), buf ); - //qDebug("TQFontGbkCodec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); + //tqDebug("TQFontGbkCodec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); return ( len == 2 ); } @@ -250,20 +250,20 @@ int TQFontGb18030_0Codec::heuristicContentMatch(const char *, int) const TQFontGb18030_0Codec::TQFontGb18030_0Codec() { - //qDebug("TQFontGb18030_0Codec::TQFontGb18030_0Codec()"); + //tqDebug("TQFontGb18030_0Codec::TQFontGb18030_0Codec()"); } const char* TQFontGb18030_0Codec::name() const { - //qDebug("TQFontGb18030_0Codec::name() = \"gb18030-0\""); + //tqDebug("TQFontGb18030_0Codec::name() = \"gb18030-0\""); return "gb18030-0"; } int TQFontGb18030_0Codec::mibEnum() const { - //qDebug("TQFontGb18030_0Codec::mibEnum() = -114"); + //tqDebug("TQFontGb18030_0Codec::mibEnum() = -114"); return -114; } @@ -288,7 +288,7 @@ TQCString TQFontGb18030_0Codec::fromUnicode(const TQString& uc, int& lenInOut ) uchar *rdata = (uchar *) result.data(); const TQChar *ucp = uc.unicode(); - //qDebug("TQFontGb18030_0Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQFontGb18030_0Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); for ( int i = 0; i < lenInOut; i++ ) { TQChar ch(*ucp++); if (ch.row () > 0 && !(ch.row () >= 0xd8 && ch.row () < 0xe0)) { @@ -317,7 +317,7 @@ void TQFontGb18030_0Codec::fromUnicode(const TQChar *in, unsigned short *out, in bool TQFontGb18030_0Codec::canEncode( TQChar ch ) const { - //qDebug("TQFontGb18030_0Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); + //tqDebug("TQFontGb18030_0Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); return (ch.row () > 0 && !(ch.row () >= 0xd8 && ch.row () < 0xe0)); } diff --git a/src/codecs/qfonthkcodec.cpp b/src/codecs/qfonthkcodec.cpp index 6d53bc6fe..954d53ea1 100644 --- a/src/codecs/qfonthkcodec.cpp +++ b/src/codecs/qfonthkcodec.cpp @@ -54,29 +54,29 @@ int TQFontBig5hkscsCodec::heuristicContentMatch(const char *, int) const int TQFontBig5hkscsCodec::heuristicNameMatch(const char* hint) const { - //qDebug("TQFontBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); - return ( qstricmp(hint, "big5hkscs-0") == 0 || - qstricmp(hint, "hkscs-1") == 0 ) + //tqDebug("TQFontBig5hkscsCodec::heuristicNameMatch(const char* hint = \"%s\")", hint); + return ( tqstricmp(hint, "big5hkscs-0") == 0 || + tqstricmp(hint, "hkscs-1") == 0 ) ? 13 : 0; } TQFontBig5hkscsCodec::TQFontBig5hkscsCodec() { - //qDebug("TQFontBig5hkscsCodec::TQFontBig5hkscsCodec()"); + //tqDebug("TQFontBig5hkscsCodec::TQFontBig5hkscsCodec()"); } const char* TQFontBig5hkscsCodec::name() const { - //qDebug("TQFontBig5hkscsCodec::name() = \"big5hkscs-0\""); + //tqDebug("TQFontBig5hkscsCodec::name() = \"big5hkscs-0\""); return "big5hkscs-0"; } int TQFontBig5hkscsCodec::mibEnum() const { - //qDebug("TQFontBig5hkscsCodec::mibEnum() = -2101"); + //tqDebug("TQFontBig5hkscsCodec::mibEnum() = -2101"); return -2101; } @@ -97,7 +97,7 @@ TQFontBig5hkscsCodec::characterFromUnicode(const TQString &str, int pos) const TQCString TQFontBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut ) const { - //qDebug("TQFontBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQFontBig5hkscsCodec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); TQCString result(lenInOut * 2 + 1); uchar *rdata = (uchar *) result.data(); const TQChar *ucp = uc.unicode(); @@ -151,7 +151,7 @@ void TQFontBig5hkscsCodec::fromUnicode(const TQChar *in, unsigned short *out, in bool TQFontBig5hkscsCodec::canEncode( TQChar ch ) const { - //qDebug("TQFontBig5hkscsCodec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); + //tqDebug("TQFontBig5hkscsCodec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); uchar c[2]; return ( qt_UnicodeToBig5hkscs( ch.unicode(), c ) == 2 ); } diff --git a/src/codecs/qfonttwcodec.cpp b/src/codecs/qfonttwcodec.cpp index 554fcd771..7fe3f80d3 100644 --- a/src/codecs/qfonttwcodec.cpp +++ b/src/codecs/qfonttwcodec.cpp @@ -54,29 +54,29 @@ int TQFontBig5Codec::heuristicContentMatch(const char *, int) const int TQFontBig5Codec::heuristicNameMatch(const char* hint) const { - //qDebug("TQFontBig5Codec::heuristicNameMatch(const char* hint = \"%s\")", hint); - return ( qstricmp(hint, "big5-0") == 0 || - qstricmp(hint, "big5.eten-0") == 0 ) + //tqDebug("TQFontBig5Codec::heuristicNameMatch(const char* hint = \"%s\")", hint); + return ( tqstricmp(hint, "big5-0") == 0 || + tqstricmp(hint, "big5.eten-0") == 0 ) ? 13 : 0; } TQFontBig5Codec::TQFontBig5Codec() { - //qDebug("TQFontBig5Codec::TQFontBig5Codec()"); + //tqDebug("TQFontBig5Codec::TQFontBig5Codec()"); } const char* TQFontBig5Codec::name() const { - //qDebug("TQFontBig5Codec::name() = \"big5-0\""); + //tqDebug("TQFontBig5Codec::name() = \"big5-0\""); return "big5-0"; } int TQFontBig5Codec::mibEnum() const { - //qDebug("TQFontBig5Codec::mibEnum() = -2026"); + //tqDebug("TQFontBig5Codec::mibEnum() = -2026"); return -2026; } @@ -97,7 +97,7 @@ unsigned short TQFontBig5Codec::characterFromUnicode(const TQString &str, int po TQCString TQFontBig5Codec::fromUnicode(const TQString& uc, int& lenInOut ) const { - //qDebug("TQFontBig5Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQFontBig5Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); TQCString result(lenInOut * 2 + 1); uchar *rdata = (uchar *) result.data(); const TQChar *ucp = uc.unicode(); @@ -152,7 +152,7 @@ void TQFontBig5Codec::fromUnicode(const TQChar *in, unsigned short *out, int len bool TQFontBig5Codec::canEncode( TQChar ch ) const { - //qDebug("TQFontBig5Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); + //tqDebug("TQFontBig5Codec::canEncode( TQChar ch = %02X%02X )", ch.row(), ch.cell()); uchar c[2]; return ( qt_UnicodeToBig5hkscs( ch.unicode(), c ) == 2 && c[0] >= 0xa1 && c[0] <= 0xf9 ); diff --git a/src/codecs/qgb18030codec.cpp b/src/codecs/qgb18030codec.cpp index 74f833362..8ed96fc74 100644 --- a/src/codecs/qgb18030codec.cpp +++ b/src/codecs/qgb18030codec.cpp @@ -161,7 +161,7 @@ TQGb18030Codec::TQGb18030Codec() /*! \reimp */ const char* TQGb18030Codec::name() const { - //qDebug("TQGb18030Codec::name() = \"GB18030\""); + //tqDebug("TQGb18030Codec::name() = \"GB18030\""); return "GB18030"; } @@ -179,7 +179,7 @@ TQCString TQGb18030Codec::fromUnicode(const TQString& uc, int& lenInOut) const TQCString rstr(rlen); uchar* cursor = (uchar*)rstr.data(); - //qDebug("TQGb18030Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); + //tqDebug("TQGb18030Codec::fromUnicode(const TQString& uc, int& lenInOut = %d)", lenInOut); for (int i=0; i 0 ) return 10; int score = 0; bool ja = FALSE; - if (qstrnicmp(hint, "ja_JP", 5) == 0 || qstrnicmp(hint, "japan", 5) == 0) { + if (tqstrnicmp(hint, "ja_JP", 5) == 0 || tqstrnicmp(hint, "japan", 5) == 0) { score += 3; ja = TRUE; - } else if (qstrnicmp(hint, "ja", 2) == 0) { + } else if (tqstrnicmp(hint, "ja", 2) == 0) { score += 2; ja = TRUE; } @@ -412,8 +412,8 @@ int TQJisCodec::heuristicNameMatch(const char* hint) const p = hint; } if (p) { - if ((qstricmp(p, "JIS") == 0) || - (qstricmp(p, "JIS7") == 0) || + if ((tqstricmp(p, "JIS") == 0) || + (tqstricmp(p, "JIS7") == 0) || (simpleHeuristicNameMatch("ISO-2022-JP", p) > 0)) { return score + 4; } diff --git a/src/codecs/qjpunicode.cpp b/src/codecs/qjpunicode.cpp index 1a6c34aea..e3b08f8fa 100644 --- a/src/codecs/qjpunicode.cpp +++ b/src/codecs/qjpunicode.cpp @@ -778,32 +778,32 @@ TQJpUnicodeConv *TQJpUnicodeConv::newConverter(int rule) s = env.mid(i, j - i).stripWhiteSpace(); i = j + 1; } - if (qstricmp(s, "unicode-0.9") == 0) { + if (tqstricmp(s, "unicode-0.9") == 0) { rule = (rule & 0xff00) | Unicode; - } else if (qstricmp(s, "unicode-0201") == 0) { + } else if (tqstricmp(s, "unicode-0201") == 0) { rule = (rule & 0xff00) | Unicode_JISX0201; - } else if (qstricmp(s, "unicode-ascii") == 0) { + } else if (tqstricmp(s, "unicode-ascii") == 0) { rule = (rule & 0xff00) | Unicode_ASCII; - } else if (qstricmp(s, "jisx0221-1995") == 0) { + } else if (tqstricmp(s, "jisx0221-1995") == 0) { rule = (rule & 0xff00) | JISX0221_JISX0201; - } else if ((qstricmp(s, "open-0201") == 0) || - (qstricmp(s, "open-19970715-0201") == 0)) { + } else if ((tqstricmp(s, "open-0201") == 0) || + (tqstricmp(s, "open-19970715-0201") == 0)) { rule = (rule & 0xff00) | JISX0221_JISX0201; - } else if ((qstricmp(s, "open-ascii") == 0) || - (qstricmp(s, "open-19970715-ascii") == 0)) { + } else if ((tqstricmp(s, "open-ascii") == 0) || + (tqstricmp(s, "open-19970715-ascii") == 0)) { rule = (rule & 0xff00) | JISX0221_ASCII; - } else if ((qstricmp(s, "open-ms") == 0) || - (qstricmp(s, "open-19970715-ms") == 0)) { + } else if ((tqstricmp(s, "open-ms") == 0) || + (tqstricmp(s, "open-19970715-ms") == 0)) { rule = (rule & 0xff00) | Microsoft_CP932; - } else if (qstricmp(s, "cp932") == 0) { + } else if (tqstricmp(s, "cp932") == 0) { rule = (rule & 0xff00) | Microsoft_CP932; - } else if (qstricmp(s, "jdk1.1.7") == 0) { + } else if (tqstricmp(s, "jdk1.1.7") == 0) { rule = (rule & 0xff00) | Sun_JDK117; - } else if (qstricmp(s, "nec-vdc") == 0) { + } else if (tqstricmp(s, "nec-vdc") == 0) { rule = rule | NEC_VDC; - } else if (qstricmp(s, "ibm-vdc") == 0) { + } else if (tqstricmp(s, "ibm-vdc") == 0) { rule = rule | IBM_VDC; - } else if (qstricmp(s, "udc") == 0) { + } else if (tqstricmp(s, "udc") == 0) { rule = rule | UDC; } } diff --git a/src/codecs/qrtlcodec.cpp b/src/codecs/qrtlcodec.cpp index fa1585ec8..42917b286 100644 --- a/src/codecs/qrtlcodec.cpp +++ b/src/codecs/qrtlcodec.cpp @@ -217,7 +217,7 @@ static TQString reverseLine(const TQString &str, unsigned int from, unsigned int case TQChar::DirL: if ( runDir != TQChar::DirL && runDir != TQChar::DirON ) { out += run( str, from, pos, runDir ); - qDebug( "out = %s", out.latin1() ); + tqDebug( "out = %s", out.latin1() ); from = pos; } runDir = TQChar::DirL; @@ -233,7 +233,7 @@ static TQString reverseLine(const TQString &str, unsigned int from, unsigned int case TQChar::DirEN: if ( runDir != TQChar::DirR && runDir != TQChar::DirON ) { out += run( str, from, pos, runDir ); - qDebug( "out = %s", out.latin1() ); + tqDebug( "out = %s", out.latin1() ); from = pos; } runDir = TQChar::DirR; @@ -243,7 +243,7 @@ static TQString reverseLine(const TQString &str, unsigned int from, unsigned int pos++; } out += run( str, from, pos, runDir ); - qDebug( "out = %s", out.latin1() ); + tqDebug( "out = %s", out.latin1() ); // second reversing for numbers TQString in = out; out = ""; @@ -259,7 +259,7 @@ static TQString reverseLine(const TQString &str, unsigned int from, unsigned int case TQChar::DirR: if ( runDir == TQChar::DirEN && runDir != TQChar::DirON ) { out += run( in, from, pos, TQChar::DirR ); //DirR ensures reversing - qDebug( "out = %s", out.latin1() ); + tqDebug( "out = %s", out.latin1() ); runDir = TQChar::DirR; from = pos; } @@ -269,7 +269,7 @@ static TQString reverseLine(const TQString &str, unsigned int from, unsigned int case TQChar::DirEN: if ( runDir != TQChar::DirEN && runDir != TQChar::DirON ) { out += in.mid(from, pos-from+1); - qDebug( "out = %s", out.latin1() ); + tqDebug( "out = %s", out.latin1() ); from = pos; } runDir = TQChar::DirEN; @@ -437,7 +437,7 @@ static TQString visualOrder(TQString logical, TQChar::Direction basicDir) } int i; for (i = 0; i < nitems; ++i) { - //qDebug("item %d bidiLevel=%d", i, e.items[i].analysis.bidiLevel); + //tqDebug("item %d bidiLevel=%d", i, e.items[i].analysis.bidiLevel); levels[i] = e.items[i].analysis.bidiLevel; } e.bidiReorder(nitems, levels, visualOrder); diff --git a/src/codecs/qsjiscodec.cpp b/src/codecs/qsjiscodec.cpp index 9d2df5109..7a2e0c494 100644 --- a/src/codecs/qsjiscodec.cpp +++ b/src/codecs/qsjiscodec.cpp @@ -249,10 +249,10 @@ int TQSjisCodec::heuristicNameMatch(const char* hint) const { int score = 0; bool ja = FALSE; - if (qstrnicmp(hint, "ja_JP", 5) == 0 || qstrnicmp(hint, "japan", 5) == 0) { + if (tqstrnicmp(hint, "ja_JP", 5) == 0 || tqstrnicmp(hint, "japan", 5) == 0) { score += 3; ja = TRUE; - } else if (qstrnicmp(hint, "ja", 2) == 0) { + } else if (tqstrnicmp(hint, "ja", 2) == 0) { score += 2; ja = TRUE; } @@ -267,9 +267,9 @@ int TQSjisCodec::heuristicNameMatch(const char* hint) const p = hint; } if (p) { - if ((qstricmp(p, "mscode") == 0) || - (qstricmp(p, "PCK") == 0) || - (qstricmp(p, "SJIS") == 0) || + if ((tqstricmp(p, "mscode") == 0) || + (tqstricmp(p, "PCK") == 0) || + (tqstricmp(p, "SJIS") == 0) || (simpleHeuristicNameMatch(p, "ShiftJIS") > 0) || (simpleHeuristicNameMatch(p, "x-sjis") > 0)) { return score + 4; diff --git a/src/codecs/qtextcodec.cpp b/src/codecs/qtextcodec.cpp index c03529df2..5f962118f 100644 --- a/src/codecs/qtextcodec.cpp +++ b/src/codecs/qtextcodec.cpp @@ -122,8 +122,8 @@ void TQTextCodec::deleteAllCodecs() return; #ifdef QT_THREAD_SUPPORT - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( &all ) : 0 ); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &all ) : 0 ); if ( !all ) return; #endif // QT_THREAD_SUPPORT @@ -152,8 +152,8 @@ static inline void setup() if ( all ) return; #ifdef QT_THREAD_SUPPORT - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( &all ) : 0 ); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &all ) : 0 ); if ( all ) return; #endif // QT_THREAD_SUPPORT @@ -443,7 +443,7 @@ TQTextCodec::TQTextCodec() TQTextCodec::~TQTextCodec() { if ( !destroying_is_ok ) - qWarning("TQTextCodec::~TQTextCodec() called by application"); + tqWarning("TQTextCodec::~TQTextCodec() called by application"); if ( all ) all->remove( this ); } @@ -503,7 +503,7 @@ static TQString lettersAndNumbers( const char * input ) int TQTextCodec::simpleHeuristicNameMatch(const char* name, const char* hint) { // if they're the same, return a perfect score. - if ( name && hint && *name && *hint && qstricmp( name, hint ) == 0 ) + if ( name && hint && *name && *hint && tqstricmp( name, hint ) == 0 ) return tqstrlen( hint ); // if the letters and numbers are the same, we have an "almost" @@ -667,7 +667,7 @@ public: // character buf[nbuf++] = *chars; if (nbuf + 1 == sizeof buf) { - qWarning("TQWindowsLocalDecoder: exceeded max internal buffer size"); + tqWarning("TQWindowsLocalDecoder: exceeded max internal buffer size"); nbuf = 0; } } @@ -793,7 +793,7 @@ static TQTextCodec * ru_RU_hack( const char * i ) { } else { // something else again... let's assume... *throws dice* ru_RU_codec = TQTextCodec::codecForName( "KOI8-R" ); - qWarning( "TQTextCodec: using KOI8-R, probe failed (%02x %02x %s)", + tqWarning( "TQTextCodec: using KOI8-R, probe failed (%02x %02x %s)", koi8r, latin5, i ); } setlocale( LC_CTYPE, origlocale.data() ); @@ -1297,15 +1297,15 @@ public: char comm='%'; bool incmap = FALSE; while (iod->readLine(line,maxlen) > 0) { - if (0==qstrnicmp(line,"",15)) + if (0==tqstrnicmp(line,"",15)) n = line+15; - else if (0==qstrnicmp(line," ",14)) + else if (0==tqstrnicmp(line," ",14)) esc = line[14]; - else if (0==qstrnicmp(line," ",15)) + else if (0==tqstrnicmp(line," ",15)) comm = line[15]; - else if (line[0]==comm && 0==qstrnicmp(line+1," alias ",7)) { + else if (line[0]==comm && 0==tqstrnicmp(line+1," alias ",7)) { aliases.append(line+8); - } else if (0==qstrnicmp(line,"CHARMAP",7)) { + } else if (0==tqstrnicmp(line,"CHARMAP",7)) { if (!from_unicode_page) { from_unicode_page = new char*[256]; for (int i=0; i<256; i++) @@ -1315,7 +1315,7 @@ public: to_unicode = new ushort[256]; } incmap = TRUE; - } else if (0==qstrnicmp(line,"END CHARMAP",11)) + } else if (0==tqstrnicmp(line,"END CHARMAP",11)) break; else if (incmap) { char* cursor = line; @@ -1395,7 +1395,7 @@ public: } mb[nmb++] = 0; from_unicode_page_multiByte[ch.row()][ch.cell()] - = qstrdup(mb); + = tqstrdup(mb); *mb_unicode = unicode; } else { from_unicode_page[ch.row()][ch.cell()] = (char)byte; @@ -2442,7 +2442,7 @@ int TQSimpleTextCodec::mibEnum() const int TQSimpleTextCodec::heuristicNameMatch(const char* hint) const { - if ( qstricmp( hint, mimeName() ) == 0 ) + if ( tqstricmp( hint, mimeName() ) == 0 ) return 10000; // return a large value if ( hint[0]=='k' ) { TQCString lhint = TQCString(hint).lower(); @@ -2802,18 +2802,18 @@ static void setupLocaleMapper() // First part is getting that locale name. First try setlocale() which // definitely knows it, but since we cannot fully trust it, get ready // to fall back to environment variables. - char * ctype = qstrdup( setlocale( LC_CTYPE, 0 ) ); + char * ctype = tqstrdup( setlocale( LC_CTYPE, 0 ) ); // Get the first nonempty value from $LC_ALL, $LC_CTYPE, and $LANG // environment variables. - char * lang = qstrdup( getenv("LC_ALL") ); + char * lang = tqstrdup( getenv("LC_ALL") ); if ( !lang || lang[0] == 0 || strcmp( lang, "C" ) == 0 ) { if ( lang ) delete [] lang; - lang = qstrdup( getenv("LC_CTYPE") ); + lang = tqstrdup( getenv("LC_CTYPE") ); } if ( !lang || lang[0] == 0 || strcmp( lang, "C" ) == 0 ) { if ( lang ) delete [] lang; - lang = qstrdup( getenv("LANG") ); + lang = tqstrdup( getenv("LANG") ); } // Now try these in order: @@ -2905,7 +2905,7 @@ static void realSetup() { #if defined(QT_CHECK_STATE) if ( destroying_is_ok ) - qWarning( "TQTextCodec: creating new codec during codec cleanup!" ); + tqWarning( "TQTextCodec: creating new codec during codec cleanup!" ); #endif all = new TQValueList; diff --git a/src/codecs/qtextcodecfactory.cpp b/src/codecs/qtextcodecfactory.cpp index df9757e28..aad0ac2b4 100644 --- a/src/codecs/qtextcodecfactory.cpp +++ b/src/codecs/qtextcodecfactory.cpp @@ -65,8 +65,8 @@ static void create_manager() #ifdef QT_THREAD_SUPPORT // protect manager creation - TQMutexLocker locker( qt_global_mutexpool ? - qt_global_mutexpool->get( &manager ) : 0); + TQMutexLocker locker( tqt_global_mutexpool ? + tqt_global_mutexpool->get( &manager ) : 0); // we check the manager pointer again to make sure that another thread // has not created the manager before us. diff --git a/src/codecs/qtsciicodec.cpp b/src/codecs/qtsciicodec.cpp index 87fc18b3f..e57f4fd70 100644 --- a/src/codecs/qtsciicodec.cpp +++ b/src/codecs/qtsciicodec.cpp @@ -183,7 +183,7 @@ int TQTsciiCodec::heuristicNameMatch(const char* hint) const p++; else p = hint; - if (qstricmp(p, "TSCII") == 0) + if (tqstricmp(p, "TSCII") == 0) return 4; return TQTextCodec::heuristicNameMatch(hint); } -- cgit v1.2.1