summaryrefslogtreecommitdiffstats
path: root/tdecore/network
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/network')
-rw-r--r--tdecore/network/kclientsocketbase.cpp2
-rw-r--r--tdecore/network/khttpproxysocketdevice.cpp2
-rw-r--r--tdecore/network/kresolver.cpp30
-rw-r--r--tdecore/network/kresolver.h4
-rw-r--r--tdecore/network/kresolverstandardworkers.cpp16
-rw-r--r--tdecore/network/kreverseresolver.cpp4
-rw-r--r--tdecore/network/kserversocket.cpp2
-rw-r--r--tdecore/network/ksocketaddress.cpp28
-rw-r--r--tdecore/network/ksocketaddress.h4
-rw-r--r--tdecore/network/ksocketbase.cpp2
-rw-r--r--tdecore/network/ksrvresolverworker.cpp8
11 files changed, 51 insertions, 51 deletions
diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp
index 9785ce36c..f8f993a08 100644
--- a/tdecore/network/kclientsocketbase.cpp
+++ b/tdecore/network/kclientsocketbase.cpp
@@ -148,7 +148,7 @@ bool KClientSocketBase::lookup()
{
if (d->localResolver.serviceName().isNull() &&
!d->localResolver.nodeName().isNull())
- d->localResolver.setServiceName(TQString::tqfromLatin1(""));
+ d->localResolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
diff --git a/tdecore/network/khttpproxysocketdevice.cpp b/tdecore/network/khttpproxysocketdevice.cpp
index 648f4e571..f61559bfb 100644
--- a/tdecore/network/khttpproxysocketdevice.cpp
+++ b/tdecore/network/khttpproxysocketdevice.cpp
@@ -153,7 +153,7 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
setState(0); // unset open flag
// prepare the request
- TQString request = TQString::tqfromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
+ TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
"Cache-Control: no-cache\r\n"
"Host: \r\n"
"\r\n");
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()];
diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h
index 1b13d676b..e2e08623b 100644
--- a/tdecore/network/kresolver.h
+++ b/tdecore/network/kresolver.h
@@ -796,11 +796,11 @@ public:
* Note that the encoding is illegible and, thus, should not be presented
* to the user, except if requested.
*
- * @param tqunicodeDomain the domain name to be encoded
+ * @param unicodeDomain the domain name to be encoded
* @return the ACE-encoded suitable for DNS queries if successful, a null
* TQCString if failure.
*/
- static TQCString domainToAscii(const TQString& tqunicodeDomain);
+ static TQCString domainToAscii(const TQString& unicodeDomain);
/**
* Does the inverse of @ref domainToAscii and return an Unicode domain
diff --git a/tdecore/network/kresolverstandardworkers.cpp b/tdecore/network/kresolverstandardworkers.cpp
index 6236cc15d..a6f4e4ec0 100644
--- a/tdecore/network/kresolverstandardworkers.cpp
+++ b/tdecore/network/kresolverstandardworkers.cpp
@@ -140,7 +140,7 @@ bool KBlacklistWorker::isBlacklisted(const TQString& host)
return false;
// KDE4: QLatin1String
- TQString ascii = TQString::tqfromLatin1(KResolver::domainToAscii(host));
+ TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host));
TQMutexLocker locker(&blacklistMutex);
@@ -251,7 +251,7 @@ namespace
// check blacklist
if (m_af != AF_INET &&
- KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_hostname)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname)))
break;
# ifdef USE_GETHOSTBYNAME2_R
@@ -358,7 +358,7 @@ namespace
if (socktype == 0)
socktype = SOCK_STREAM; // default
- TQString canon = KResolver::domainToUnicode(TQString::tqfromLatin1(he->h_name));
+ TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name));
KInetSocketAddress sa;
sa.setPort(m_port);
if (he->h_addrtype != AF_INET)
@@ -404,7 +404,7 @@ namespace
{
// check blacklist
if ((m_af != AF_INET && m_af != AF_UNSPEC) &&
- KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_node)))
+ KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_node)))
{
results.setError(KResolver::NoName);
finished();
@@ -550,8 +550,8 @@ bool KStandardWorker::sanityCheck()
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
- node == TQString::tqfromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
m_encodedName.truncate(0);
else
{
@@ -616,7 +616,7 @@ bool KStandardWorker::resolveService()
// service name does not contain a port number
// must be a name
- if (serviceName().isEmpty() || serviceName().compare(TQString::tqfromLatin1("*")) == 0)
+ if (serviceName().isEmpty() || serviceName().compare(TQString::fromLatin1("*")) == 0)
port = 0;
else
{
@@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically()
// now try to resolve the hostname numerically
KInetSocketAddress sa;
setError(KResolver::NoError);
- sa.setHost(KIpAddress(TQString::tqfromLatin1(m_encodedName)));
+ sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName)));
// if it failed, the length was reset to 0
bool ok = sa.length() != 0;
diff --git a/tdecore/network/kreverseresolver.cpp b/tdecore/network/kreverseresolver.cpp
index 00ef7f81d..5c602458c 100644
--- a/tdecore/network/kreverseresolver.cpp
+++ b/tdecore/network/kreverseresolver.cpp
@@ -238,8 +238,8 @@ bool ReverseThread::run()
if (err == 0)
{
- node = KResolver::domainToUnicode(TQString::tqfromLatin1(h));
- service = TQString::tqfromLatin1(s);
+ node = KResolver::domainToUnicode(TQString::fromLatin1(h));
+ service = TQString::fromLatin1(s);
success = true;
}
else
diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp
index bd63d6306..49facb12c 100644
--- a/tdecore/network/kserversocket.cpp
+++ b/tdecore/network/kserversocket.cpp
@@ -155,7 +155,7 @@ bool KServerSocket::lookup()
// make sure we have at least one parameter for lookup
if (d->resolver.serviceName().isNull() &&
!d->resolver.nodeName().isNull())
- d->resolver.setServiceName(TQString::tqfromLatin1(""));
+ d->resolver.setServiceName(TQString::fromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
diff --git a/tdecore/network/ksocketaddress.cpp b/tdecore/network/ksocketaddress.cpp
index feaabfab5..7ceeba99d 100644
--- a/tdecore/network/ksocketaddress.cpp
+++ b/tdecore/network/ksocketaddress.cpp
@@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const TQString& address)
bool KIpAddress::setAddress(const char* address)
{
- return setAddress(TQString::tqfromLatin1(address));
+ return setAddress(TQString::fromLatin1(address));
}
// set from binary data
@@ -194,13 +194,13 @@ TQString KIpAddress::toString() const
{
case 4:
inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1);
- return TQString::tqfromLatin1(buf);
+ return TQString::fromLatin1(buf);
case 6:
#ifdef AF_INET6
inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1);
#endif
- return TQString::tqfromLatin1(buf);
+ return TQString::fromLatin1(buf);
}
return TQString::null;
@@ -270,7 +270,7 @@ public:
{
addr.generic = 0L;
curlen = 0;
- tqinvalidate();
+ invalidate();
}
~KSocketAddressData()
@@ -282,7 +282,7 @@ public:
inline bool invalid() const
{ return reallen == 0; }
- inline void tqinvalidate()
+ inline void invalidate()
{ reallen = 0; }
void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true);
@@ -348,7 +348,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
if (len < MIN_SOCKADDR_LEN)
{
// certainly invalid
- tqinvalidate();
+ invalidate();
return;
}
@@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
(sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN)))
{
// also invalid
- tqinvalidate();
+ invalidate();
return;
}
@@ -444,7 +444,7 @@ KSocketAddress& KSocketAddress::operator =(const KSocketAddress& other)
if (other.d && !other.d->invalid())
d->dup(other.d->addr.generic, other.d->reallen);
else
- d->tqinvalidate();
+ d->invalidate();
return *this;
}
@@ -467,7 +467,7 @@ KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
if (sa != 0L && len >= MIN_SOCKADDR_LEN)
d->dup(sa, len);
else
- d->tqinvalidate();
+ d->invalidate();
return *this;
}
@@ -619,7 +619,7 @@ TQString KSocketAddress::toString() const
fmt = "[%1]:%2";
#endif
else if (d->addr.generic->sa_family == AF_UNIX)
- return TQString::tqfromLatin1("unix:%1").arg(serviceName());
+ return TQString::fromLatin1("unix:%1").arg(serviceName());
else
return i18n("1: the unknown socket address family number",
"Unknown family %1").arg(d->addr.generic->sa_family);
@@ -788,7 +788,7 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip)
default:
// empty
- d->tqinvalidate();
+ d->invalidate();
}
return *this;
@@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port)
#endif
default:
- d->tqinvalidate(); // setting the port on something else
+ d->invalidate(); // setting the port on something else
}
return *this;
@@ -897,7 +897,7 @@ void KInetSocketAddress::update()
return;
#endif
else
- d->tqinvalidate();
+ d->invalidate();
}
KUnixSocketAddress::KUnixSocketAddress()
@@ -908,7 +908,7 @@ KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len)
: KSocketAddress(sa, len)
{
if (!d->invalid() && d->addr.un->sun_family != AF_UNIX)
- d->tqinvalidate();
+ d->invalidate();
}
KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
diff --git a/tdecore/network/ksocketaddress.h b/tdecore/network/ksocketaddress.h
index d02a6984c..a57d11e82 100644
--- a/tdecore/network/ksocketaddress.h
+++ b/tdecore/network/ksocketaddress.h
@@ -511,7 +511,7 @@ public:
* buffer to fit needs. This function should not be used except for handling
* unknown socket address structures.
*
- * Also note that this function may tqinvalidate the socket if a known
+ * Also note that this function may invalidate the socket if a known
* family is set (Internet or Unix socket) and the new length would be
* too small to hold the system's sockaddr_* structure. If unsure, reset
* the family:
@@ -535,7 +535,7 @@ public:
/**
* Sets the family of this object.
*
- * Note: setting the family will probably tqinvalidate any address data
+ * Note: setting the family will probably invalidate any address data
* contained in this object. Use this function with care.
*
* @param family the new family to set
diff --git a/tdecore/network/ksocketbase.cpp b/tdecore/network/ksocketbase.cpp
index f5410f3e8..8449dbdc8 100644
--- a/tdecore/network/ksocketbase.cpp
+++ b/tdecore/network/ksocketbase.cpp
@@ -309,7 +309,7 @@ int KActiveSocketBase::putch(int ch)
void KActiveSocketBase::setError(int status, SocketError error)
{
KSocketBase::setError(error);
- setqStatus(status);
+ seStatus(status);
}
void KActiveSocketBase::resetError()
diff --git a/tdecore/network/ksrvresolverworker.cpp b/tdecore/network/ksrvresolverworker.cpp
index 2ec5bb4bf..f3166b982 100644
--- a/tdecore/network/ksrvresolverworker.cpp
+++ b/tdecore/network/ksrvresolverworker.cpp
@@ -54,8 +54,8 @@ bool KSrvResolverWorker::preprocess()
if (node.find('%') != -1)
node.truncate(node.find('%'));
- if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
- node == TQString::tqfromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::fromLatin1("*") ||
+ node == TQString::fromLatin1("localhost"))
return false; // empty == localhost
encodedName = KResolver::domainToAscii(node);
@@ -85,7 +85,7 @@ bool KSrvResolverWorker::preprocess()
return false;
protoname = "_";
- protoname += names.tqat(0);
+ protoname += names.at(0);
}
else if (sockettype == SOCK_STREAM || sockettype == 0)
protoname = "_tcp";
@@ -225,7 +225,7 @@ bool KSrvResolverWorker::postprocess()
void KSrvResolverWorker::customEvent(TQCustomEvent*)
{
- dns = new TQDns(TQString::tqfromLatin1(encodedName), TQDns::Srv);
+ dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv);
TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady()));
}