summaryrefslogtreecommitdiffstats
path: root/src/codecs/qgb18030codec.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-01 13:24:30 -0600
committerTimothy Pearson <[email protected]>2012-03-01 13:24:30 -0600
commita830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0 (patch)
tree3910055c634e2ca44eacd2c892118634df9b3597 /src/codecs/qgb18030codec.cpp
parentb0b53cc84f215df9b9bcce77253a6b7a9d300986 (diff)
downloadqt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.tar.gz
qt3-a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0.zip
Rename additional global TQt functions
Diffstat (limited to 'src/codecs/qgb18030codec.cpp')
-rw-r--r--src/codecs/qgb18030codec.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/codecs/qgb18030codec.cpp b/src/codecs/qgb18030codec.cpp
index fe7b1e5..ee99916 100644
--- a/src/codecs/qgb18030codec.cpp
+++ b/src/codecs/qgb18030codec.cpp
@@ -161,7 +161,7 @@ QGb18030Codec::QGb18030Codec()
/*! \reimp */
const char* QGb18030Codec::name() const
{
- //qDebug("QGb18030Codec::name() = \"GB18030\"");
+ //tqDebug("QGb18030Codec::name() = \"GB18030\"");
return "GB18030";
}
@@ -179,7 +179,7 @@ QCString QGb18030Codec::fromUnicode(const QString& uc, int& lenInOut) const
QCString rstr(rlen);
uchar* cursor = (uchar*)rstr.data();
- //qDebug("QGb18030Codec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
+ //tqDebug("QGb18030Codec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
for (int i=0; i<l; i++) {
QChar ch = uc[i];
int len;
@@ -231,7 +231,7 @@ QString QGb18030Codec::toUnicode(const char* chars, int len) const
QString result;
int clen;
- //qDebug("QGb18030Codec::toUnicode(const char* chars, int len = %d)", len);
+ //tqDebug("QGb18030Codec::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; ) {
uchar ch = chars[i];
@@ -274,8 +274,8 @@ int QGb18030Codec::heuristicNameMatch(const char* hint) const
{
int score = 0;
bool zh = FALSE;
- //qDebug("QGb18030Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
- if (qstrnicmp(hint, "zh_CN", 5) == 0){
+ //tqDebug("QGb18030Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
+ if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
zh = TRUE;
}
@@ -289,7 +289,7 @@ int QGb18030Codec::heuristicNameMatch(const char* hint) const
p = hint;
}
if (p) {
- if (qstricmp(p, "GB18030") == 0)
+ if (tqstricmp(p, "GB18030") == 0)
return score + 14;
}
return QTextCodec::heuristicNameMatch(hint);
@@ -299,7 +299,7 @@ int QGb18030Codec::heuristicNameMatch(const char* hint) const
int QGb18030Codec::heuristicContentMatch(const char* chars, int len) const
{
int score = 0;
- //qDebug("QGb18030Codec::heuristicContentMatch(const char* chars, int len = %d)", len);
+ //tqDebug("QGb18030Codec::heuristicContentMatch(const char* chars, int len = %d)", len);
for (int i=0; i<len; i++) {
uchar ch = chars[i];
// No nulls allowed.
@@ -351,7 +351,7 @@ public:
QString toUnicode(const char* chars, int len)
{
QString result;
- //qDebug("QGb18030Decoder::toUnicode(const char* chars, int len = %d)", len);
+ //tqDebug("QGb18030Decoder::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; i++) {
uchar ch = chars[i];
switch (nbuf) {
@@ -433,7 +433,7 @@ public:
/*! \reimp */
QTextDecoder* QGb18030Codec::makeDecoder() const
{
- //qDebug("QGb18030Codec::makeDecoder()");
+ //tqDebug("QGb18030Codec::makeDecoder()");
return new QGb18030Decoder();
}
@@ -480,15 +480,15 @@ int QGbkCodec::heuristicNameMatch(const char* hint) const
{
#if 0
// these are needed so that the X11 fonts behave correctly.
- if (qstricmp (hint, "gbk-0") == 0 ||
- qstricmp (hint, "gb18030.2000-0") == 0)
+ if (tqstricmp (hint, "gbk-0") == 0 ||
+ tqstricmp (hint, "gb18030.2000-0") == 0)
return 13;
#endif
int score = 0;
bool zh = FALSE;
- //qDebug("QGbkCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
- if (qstrnicmp(hint, "zh_CN", 5) == 0){
+ //tqDebug("QGbkCodec::heuristicNameMatch(const char* hint = \"%s\")", hint);
+ if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
zh = TRUE;
}
@@ -502,7 +502,7 @@ int QGbkCodec::heuristicNameMatch(const char* hint) const
p = hint;
}
if (p) {
- if (qstricmp(p, "GBK") == 0)
+ if (tqstricmp(p, "GBK") == 0)
return score + 6;
}
return QTextCodec::heuristicNameMatch(hint);
@@ -511,7 +511,7 @@ int QGbkCodec::heuristicNameMatch(const char* hint) const
/*! \reimp */
int QGbkCodec::heuristicContentMatch(const char* /*chars*/, int /*len*/) const
{
- //qDebug("QGbkCodec::heuristicContentMatch(const char* /*chars*/, int /*len*/)");
+ //tqDebug("QGbkCodec::heuristicContentMatch(const char* /*chars*/, int /*len*/)");
return 0;
}
@@ -526,7 +526,7 @@ public:
{
QString result;
- //qDebug("QGbkDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
+ //tqDebug("QGbkDecoder::toUnicode(const char* chars = \"%s\", int len = %d)", chars, len);
for (int i=0; i<len; i++) {
uchar ch = chars[i];
switch (nbuf) {
@@ -570,7 +570,7 @@ public:
/*! \reimp */
QTextDecoder* QGbkCodec::makeDecoder() const
{
- //qDebug("QGbkCodec::makeDecoder()");
+ //tqDebug("QGbkCodec::makeDecoder()");
return new QGbkDecoder();
}
@@ -582,7 +582,7 @@ QCString QGbkCodec::fromUnicode(const QString& uc, int& lenInOut) const
QCString rstr(rlen);
uchar* cursor = (uchar*)rstr.data();
- //qDebug("QGbkCodec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
+ //tqDebug("QGbkCodec::fromUnicode(const QString& uc, int& lenInOut = %d)", lenInOut);
for (int i=0; i<l; i++) {
QChar ch = uc[i];
uchar buf[2];
@@ -610,7 +610,7 @@ QString QGbkCodec::toUnicode(const char* chars, int len) const
QString result;
int clen;
- //qDebug("QGbkCodec::toUnicode(const char* chars, int len = %d)", len);
+ //tqDebug("QGbkCodec::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; ) {
uchar ch = chars[i];
@@ -681,8 +681,8 @@ int QGb2312Codec::heuristicNameMatch(const char* hint) const
{
int score = 0;
bool zh = FALSE;
- //qDebug("QGb2312Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
- if (qstrnicmp(hint, "zh_CN", 5) == 0){
+ //tqDebug("QGb2312Codec::heuristicNameMatch(const char* hint = \"%s\")", hint);
+ if (tqstrnicmp(hint, "zh_CN", 5) == 0){
score += 10;
zh = TRUE;
}
@@ -696,13 +696,13 @@ int QGb2312Codec::heuristicNameMatch(const char* hint) const
p = hint;
}
if (p) {
- if (qstricmp(p, "GB2312") == 0 ||
- qstricmp(p, "hp15cn") == 0)
+ if (tqstricmp(p, "GB2312") == 0 ||
+ tqstricmp(p, "hp15cn") == 0)
return score + 7;
- else if (qstricmp(p, "eucCN") == 0)
+ else if (tqstricmp(p, "eucCN") == 0)
return score + 4;
// there exists ja_JP.EUC, ko_KR.EUC, zh_CN.EUC and zh_TW.EUC
- else if (qstricmp(p, "euc") == 0 && zh)
+ else if (tqstricmp(p, "euc") == 0 && zh)
return score + 4;
}
return QTextCodec::heuristicNameMatch(hint);
@@ -711,7 +711,7 @@ int QGb2312Codec::heuristicNameMatch(const char* hint) const
/*! \reimp */
int QGb2312Codec::heuristicContentMatch(const char* /*chars*/, int /*len*/) const
{
- //qDebug("QGb2312Codec::heuristicContentMatch(const char* /*chars*/, int /*len*/)");
+ //tqDebug("QGb2312Codec::heuristicContentMatch(const char* /*chars*/, int /*len*/)");
return 0;
}
@@ -725,7 +725,7 @@ public:
QString toUnicode(const char* chars, int len)
{
QString result;
- //qDebug("QGb2312Decoder::toUnicode(const char* chars, int len = %d)", len);
+ //tqDebug("QGb2312Decoder::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; i++) {
uchar ch = chars[i];
switch (nbuf) {
@@ -769,7 +769,7 @@ public:
/*! \reimp */
QTextDecoder* QGb2312Codec::makeDecoder() const
{
- //qDebug("QGb2312Codec::makeDecoder()");
+ //tqDebug("QGb2312Codec::makeDecoder()");
return new QGb2312Decoder();
}
@@ -781,7 +781,7 @@ QCString QGb2312Codec::fromUnicode(const QString& uc, int& lenInOut) const
QCString rstr(rlen);
uchar* cursor = (uchar*)rstr.data();
- //qDebug("QGb2312Codec::fromUnicode(const QString& uc, int& lenInOut = %d) const", lenInOut);
+ //tqDebug("QGb2312Codec::fromUnicode(const QString& uc, int& lenInOut = %d) const", lenInOut);
for (int i=0; i<l; i++) {
QChar ch = uc[i];
uchar buf[2];
@@ -810,7 +810,7 @@ QString QGb2312Codec::toUnicode(const char* chars, int len) const
QString result;
int clen;
- //qDebug("QGb2312Codec::toUnicode(const char* chars, int len = %d)", len);
+ //tqDebug("QGb2312Codec::toUnicode(const char* chars, int len = %d)", len);
for (int i=0; i<len; ) {
uchar ch = chars[i];