diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdecore/kcharsets.cpp | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kcharsets.cpp')
-rw-r--r-- | kdecore/kcharsets.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp index 52cf87849..027dba367 100644 --- a/kdecore/kcharsets.cpp +++ b/kdecore/kcharsets.cpp @@ -202,7 +202,7 @@ static struct Builtin { "ascii", "iso 8859-1" }, { "x-utf-8", "utf-8" }, { "x-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt - { "unicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt + { "tqunicode-1-1-utf-7", "utf-7" }, // ### FIXME: UTF-7 is not in Qt { "utf-16", "iso-10646-ucs-2" }, { "utf16", "iso-10646-ucs-2" }, { "ucs2", "iso-10646-ucs-2" }, @@ -381,11 +381,11 @@ TQChar KCharsets::fromEntity(const TQString &str) if (str[pos] == (QChar)'x' || str[pos] == (QChar)'X') { pos++; // '�', hexadeciaml character reference - TQString tmp(str.unicode()+pos, str.length()-pos); + TQString tmp(str.tqunicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 16); } else { // '�', decimal character reference - TQString tmp(str.unicode()+pos, str.length()-pos); + TQString tmp(str.tqunicode()+pos, str.length()-pos); res = tmp.toInt(&ok, 10); } return res; @@ -422,14 +422,14 @@ TQChar KCharsets::fromEntity(const TQString &str, int &len) TQString KCharsets::toEntity(const TQChar &ch) { TQString ent; - ent.sprintf("�x%x;", ch.unicode()); + ent.sprintf("�x%x;", ch.tqunicode()); return ent; } TQString KCharsets::resolveEntities( const TQString &input ) { TQString text = input; - const TQChar *p = text.unicode(); + const TQChar *p = text.tqunicode(); const TQChar *end = p + text.length(); const TQChar *ampersand = 0; bool scanForSemicolon = false; @@ -460,12 +460,12 @@ TQString KCharsets::resolveEntities( const TQString &input ) if ( entityValue.isNull() ) continue; - const uint ampersandPos = ampersand - text.unicode(); + const uint ampersandPos = ampersand - text.tqunicode(); text[ (int)ampersandPos ] = entityValue; text.remove( ampersandPos + 1, entityLength + 1 ); - p = text.unicode() + ampersandPos; - end = text.unicode() + text.length(); + p = text.tqunicode() + ampersandPos; + end = text.tqunicode() + text.length(); ampersand = 0; } @@ -477,7 +477,7 @@ TQStringList KCharsets::availableEncodingNames() TQStringList available; for ( const char* const* pos = charsets_for_encoding; *pos; ++pos ) { //kdDebug(0) << *charsets << " available" << endl; - available.append( TQString::fromLatin1( *pos )); + available.append( TQString::tqfromLatin1( *pos )); } return available; } @@ -491,14 +491,14 @@ TQString KCharsets::languageForEncoding( const TQString &encoding ) TQString KCharsets::encodingForName( const TQString &descriptiveName ) { - const int left = descriptiveName.findRev( '(' ); + const int left = descriptiveName.tqfindRev( '(' ); if (left<0) // No parenthesis, so assume it is a normal encoding name return descriptiveName.stripWhiteSpace(); TQString name(descriptiveName.mid(left+1)); - const int right = name.findRev( ')' ); + const int right = name.tqfindRev( ')' ); if (right<0) return name; @@ -511,7 +511,7 @@ TQStringList KCharsets::descriptiveEncodingNames() // As we are sorting, we can directly read the array language_for_encoding TQStringList encodings; for ( const LanguageForEncoding* pos = language_for_encoding; pos->index; ++pos ) { - const TQString name = TQString::fromLatin1( pos->index ); + const TQString name = TQString::tqfromLatin1( pos->index ); const TQString description = i18n( language_names[ pos->data ] ); encodings.append( i18n("Descriptive Encoding Name", "%1 ( %2 )"). arg ( description ). arg( name ) ); } @@ -536,7 +536,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if (n.isEmpty()) { codec = KGlobal::locale()->codecForEncoding(); - d->codecForNameDict.replace("->locale<-", codec); + d->codecForNameDict.tqreplace("->locale<-", codec); return codec; } @@ -553,7 +553,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(name); if(codec) { - d->codecForNameDict.replace(key, codec); + d->codecForNameDict.tqreplace(key, codec); return codec; } @@ -566,14 +566,14 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if(codec) { - d->codecForNameDict.replace(key, codec); + d->codecForNameDict.tqreplace(key, codec); return codec; } TQString dir; { KConfigGroupSaver cfgsav( KGlobal::config(), "i18n" ); - dir = KGlobal::config()->readPathEntry("i18ndir", TQString::fromLatin1("/usr/share/i18n/charmaps")); + dir = KGlobal::config()->readPathEntry("i18ndir", TQString::tqfromLatin1("/usr/share/i18n/charmaps")); } // these are codecs not included in Qt. They can be build up if the corresponding charmap @@ -584,7 +584,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const cname = name; cname = cname.upper(); - const TQString basicName = TQString::fromLatin1(cname); + const TQString basicName = TQString::tqfromLatin1(cname); kdDebug() << k_funcinfo << endl << " Trying to find " << cname << " in " << dir << endl; TQString charMapFileName; @@ -642,7 +642,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const } if(codec) { - d->codecForNameDict.replace(key, codec); + d->codecForNameDict.tqreplace(key, codec); return codec; } @@ -654,7 +654,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(cname); if(codec) { - d->codecForNameDict.replace(key, codec); + d->codecForNameDict.tqreplace(key, codec); return codec; } |