diff options
Diffstat (limited to 'tdecore/network/kresolver.cpp')
-rw-r--r-- | tdecore/network/kresolver.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 93c029b8e..672edb5af 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -915,7 +915,7 @@ TQString KResolver::localHostName() } if (name.isEmpty()) - return TQString::tqfromLatin1("localhost"); + return TQString::fromLatin1("localhost"); if (name.find('.') == -1) { @@ -924,7 +924,7 @@ TQString KResolver::localHostName() KResolverResults results = resolve(name, "0", CanonName); if (results.isEmpty()) // cannot find a valid hostname! - return TQString::tqfromLatin1("localhost"); + return TQString::fromLatin1("localhost"); else return results.first().canonicalName(); } @@ -934,7 +934,7 @@ TQString KResolver::localHostName() // forward declaration -static TQStringList splitLabels(const TQString& tqunicodeDomain); +static TQStringList splitLabels(const TQString& unicodeDomain); static TQCString ToASCII(const TQString& label); static TQString ToUnicode(const TQString& label); @@ -943,11 +943,11 @@ static TQStringList *KResolver_initIdnDomains() const char *kde_use_idn = getenv("KDE_USE_IDN"); if (!kde_use_idn) kde_use_idn = "ac:at:br:cat:ch:cl:cn:de:dk:fi:gr:hu:info:io:is:jp:kr:li:lt:museum:org:no:se:sh:th:tm:tw:vn"; - return new TQStringList(TQStringList::split(':', TQString::tqfromLatin1(kde_use_idn).lower())); + return new TQStringList(TQStringList::split(':', TQString::fromLatin1(kde_use_idn).lower())); } // implement the ToAscii function, as described by IDN documents -TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) +TQCString KResolver::domainToAscii(const TQString& unicodeDomain) { if (!idnDomains) idnDomains = KResolver_initIdnDomains(); @@ -958,7 +958,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) // 2) split the domain into individual labels, without // separators. - TQStringList input = splitLabels(tqunicodeDomain); + TQStringList input = splitLabels(unicodeDomain); // Do we allow IDN names for this TLD? if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) @@ -987,7 +987,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) TQString KResolver::domainToUnicode(const TQCString& asciiDomain) { - return domainToUnicode(TQString::tqfromLatin1(asciiDomain)); + return domainToUnicode(TQString::fromLatin1(asciiDomain)); } // implement the ToUnicode function, as described by IDN documents @@ -1048,7 +1048,7 @@ void KResolver::virtual_hook( int, void* ) // RFC 3492 - Punycode: A Bootstring encoding of Unicode // for Internationalized Domain Names in Applications (IDNA) -static TQStringList splitLabels(const TQString& tqunicodeDomain) +static TQStringList splitLabels(const TQString& unicodeDomain) { // From RFC 3490 section 3.1: // "Whenever dots are used as label separators, the following characters @@ -1060,9 +1060,9 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) TQStringList lst; int start = 0; uint i; - for (i = 0; i < tqunicodeDomain.length(); i++) + for (i = 0; i < unicodeDomain.length(); i++) { - unsigned int c = tqunicodeDomain[i].tqunicode(); + unsigned int c = unicodeDomain[i].unicode(); if (c == separators[0] || c == separators[1] || @@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& tqunicodeDomain) c == separators[3]) { // found a separator! - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); start = i + 1; } } if ((long)i >= start) // there is still one left - lst << tqunicodeDomain.mid(start, i - start); + lst << unicodeDomain.mid(start, i - start); return lst; } @@ -1101,7 +1101,7 @@ static TQCString ToASCII(const TQString& label) uint i; for (i = 0; i < label.length(); i++) - ucs4[i] = (unsigned long)label[i].tqunicode(); + ucs4[i] = (unsigned long)label[i].unicode(); ucs4[i] = 0; // terminate with NUL, just to be on the safe side if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS) @@ -1118,7 +1118,7 @@ static TQCString ToASCII(const TQString& label) static TQString ToUnicode(const TQString& label) { #ifdef HAVE_IDNA_H - // We have idna.h, so we can use the idna_to_tqunicode + // We have idna.h, so we can use the idna_to_unicode // function :) TQ_UINT32 *ucs4_input, *ucs4_output; @@ -1126,7 +1126,7 @@ static TQString ToUnicode(const TQString& label) ucs4_input = new TQ_UINT32[label.length() + 1]; for (uint i = 0; i < label.length(); i++) - ucs4_input[i] = (unsigned long)label[i].tqunicode(); + ucs4_input[i] = (unsigned long)label[i].unicode(); // try the same length for output ucs4_output = new TQ_UINT32[outlen = label.length()]; |