summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-28 22:31:39 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-28 22:31:39 -0600
commit41bb408dde90e755b07cd2ab8a9bdec7548c84b0 (patch)
tree6d4d5407c000add30aa78630e009c0e5d633e440 /src/network
parent1740cd279522c060e738bbbffacab83355d2b794 (diff)
downloadtqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.tar.gz
tqt3-41bb408dde90e755b07cd2ab8a9bdec7548c84b0.zip
Automated conversion from qt3
Diffstat (limited to 'src/network')
-rw-r--r--src/network/ntqnetwork.h4
-rw-r--r--src/network/qdns.cpp124
-rw-r--r--src/network/qftp.cpp54
-rw-r--r--src/network/qhttp.cpp22
-rw-r--r--src/network/qnetwork.cpp4
-rw-r--r--src/network/qserversocket.cpp2
-rw-r--r--src/network/qsocket.cpp56
-rw-r--r--src/network/qsocketdevice.cpp12
-rw-r--r--src/network/qsocketdevice_unix.cpp30
9 files changed, 154 insertions, 154 deletions
diff --git a/src/network/ntqnetwork.h b/src/network/ntqnetwork.h
index 2431b9ef5..800414bf0 100644
--- a/src/network/ntqnetwork.h
+++ b/src/network/ntqnetwork.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Definition of qInitNetworkProtocols function.
+** Definition of tqInitNetworkProtocols function.
**
** Created : 970521
**
@@ -53,7 +53,7 @@
#ifndef QT_NO_NETWORK
-TQM_EXPORT_NETWORK void qInitNetworkProtocols();
+TQM_EXPORT_NETWORK void tqInitNetworkProtocols();
#endif
diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp
index 17b78b684..ac5ced853 100644
--- a/src/network/qdns.cpp
+++ b/src/network/qdns.cpp
@@ -411,7 +411,7 @@ void TQDnsAnswer::parseA()
{
if ( next != pp + 4 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %d bytes long IN A for %s",
+ tqDebug( "TQDns: saw %d bytes long IN A for %s",
next - pp, label.ascii() );
#endif
return;
@@ -424,7 +424,7 @@ void TQDnsAnswer::parseA()
( answer[pp+2] << 8 ) +
( answer[pp+3] ) );
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN A %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN A %s (ttl %d)", label.ascii(),
rr->address.toString().ascii(), ttl );
#endif
}
@@ -434,7 +434,7 @@ void TQDnsAnswer::parseAaaa()
{
if ( next != pp + 16 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %d bytes long IN Aaaa for %s",
+ tqDebug( "TQDns: saw %d bytes long IN Aaaa for %s",
next - pp, label.ascii() );
#endif
return;
@@ -444,7 +444,7 @@ void TQDnsAnswer::parseAaaa()
rr->t = TQDns::Aaaa;
rr->address = TQHostAddress( answer+pp );
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN Aaaa %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN Aaaa %s (ttl %d)", label.ascii(),
rr->address.toString().ascii(), ttl );
#endif
}
@@ -455,7 +455,7 @@ void TQDnsAnswer::parseMx()
{
if ( next < pp + 2 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %d bytes long IN MX for %s",
+ tqDebug( "TQDns: saw %d bytes long IN MX for %s",
next - pp, label.ascii() );
#endif
return;
@@ -467,13 +467,13 @@ void TQDnsAnswer::parseMx()
rr->target = readString().lower();
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad string in MX for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad string in MX for %s", label.ascii() );
#endif
return;
}
rr->t = TQDns::Mx;
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN MX %d %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN MX %d %s (ttl %d)", label.ascii(),
rr->priority, rr->target.ascii(), ttl );
#endif
}
@@ -483,7 +483,7 @@ void TQDnsAnswer::parseSrv()
{
if ( next < pp + 6 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %d bytes long IN SRV for %s",
+ tqDebug( "TQDns: saw %d bytes long IN SRV for %s",
next - pp, label.ascii() );
#endif
return;
@@ -497,13 +497,13 @@ void TQDnsAnswer::parseSrv()
rr->target = readString().lower();
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad string in SRV for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad string in SRV for %s", label.ascii() );
#endif
return;
}
rr->t = TQDns::Srv;
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN SRV %d %d %d %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN SRV %d %d %d %s (ttl %d)", label.ascii(),
rr->priority, rr->weight, rr->port, rr->target.ascii(), ttl );
#endif
}
@@ -514,7 +514,7 @@ void TQDnsAnswer::parseCname()
TQString target = readString().lower();
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad cname for for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad cname for for %s", label.ascii() );
#endif
return;
}
@@ -523,7 +523,7 @@ void TQDnsAnswer::parseCname()
rr->t = TQDns::Cname;
rr->target = target;
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN CNAME %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN CNAME %s (ttl %d)", label.ascii(),
rr->target.ascii(), ttl );
#endif
}
@@ -534,7 +534,7 @@ void TQDnsAnswer::parseNs()
TQString target = readString().lower();
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad cname for for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad cname for for %s", label.ascii() );
#endif
return;
}
@@ -542,7 +542,7 @@ void TQDnsAnswer::parseNs()
// parse, but ignore
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN NS %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN NS %s (ttl %d)", label.ascii(),
target.ascii(), ttl );
#endif
}
@@ -553,7 +553,7 @@ void TQDnsAnswer::parsePtr()
TQString target = readString().lower();
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad PTR for for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad PTR for for %s", label.ascii() );
#endif
return;
}
@@ -562,7 +562,7 @@ void TQDnsAnswer::parsePtr()
rr->t = TQDns::Ptr;
rr->target = target;
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN PTR %s (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN PTR %s (ttl %d)", label.ascii(),
rr->target.ascii(), ttl );
#endif
}
@@ -573,7 +573,7 @@ void TQDnsAnswer::parseTxt()
TQString text = readString(FALSE);
if ( !ok ) {
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw bad TXT for for %s", label.ascii() );
+ tqDebug( "TQDns: saw bad TXT for for %s", label.ascii() );
#endif
return;
}
@@ -582,7 +582,7 @@ void TQDnsAnswer::parseTxt()
rr->t = TQDns::Txt;
rr->text = text;
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns: saw %s IN TXT \"%s\" (ttl %d)", label.ascii(),
+ tqDebug( "TQDns: saw %s IN TXT \"%s\" (ttl %d)", label.ascii(),
rr->text.ascii(), ttl );
#endif
}
@@ -593,7 +593,7 @@ void TQDnsAnswer::parse()
// okay, do the work...
if ( (answer[2] & 0x78) != 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: answer to wrong query type (%d)", answer[1] );
+ tqDebug( "DNS Manager: answer to wrong query type (%d)", answer[1] );
#endif
ok = FALSE;
return;
@@ -605,7 +605,7 @@ void TQDnsAnswer::parse()
// TC
if ( (answer[2] & 2) != 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: truncated answer; pressing on" );
+ tqDebug( "DNS Manager: truncated answer; pressing on" );
#endif
}
@@ -617,7 +617,7 @@ void TQDnsAnswer::parse()
if ( (answer[3] & 0x0f) == 3 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: saw NXDomain for %s", query->l.ascii() );
+ tqDebug( "DNS Manager: saw NXDomain for %s", query->l.ascii() );
#endif
// NXDomain. cache that for one minute.
rr = new TQDnsRR( query->l );
@@ -632,7 +632,7 @@ void TQDnsAnswer::parse()
if ( (answer[3] & 0x0f) != 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: error code %d", answer[3] & 0x0f );
+ tqDebug( "DNS Manager: error code %d", answer[3] & 0x0f );
#endif
ok = FALSE;
return;
@@ -671,7 +671,7 @@ void TQDnsAnswer::parse()
rdlength = ( answer[pp+8] << 8 ) + answer[pp+9];
if ( pp + 10 + rdlength > size ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: ran out of stuff to parse (%d+%d>%d (%d)",
+ tqDebug( "DNS Manager: ran out of stuff to parse (%d+%d>%d (%d)",
pp, rdlength, size, rrno < ancount );
#endif
// if we're still in the AN section, we should go back and
@@ -689,7 +689,7 @@ void TQDnsAnswer::parse()
pp = pp + 10;
if ( clas != 1 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: class %d (not internet) for %s",
+ tqDebug( "DNS Manager: class %d (not internet) for %s",
clas, label.isNull() ? "." : label.ascii() );
#endif
} else {
@@ -723,7 +723,7 @@ void TQDnsAnswer::parse()
default:
// something we don't know
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: type %d for %s", type,
+ tqDebug( "DNS Manager: type %d for %s", type,
label.isNull() ? "." : label.ascii() );
#endif
break;
@@ -750,7 +750,7 @@ void TQDnsAnswer::parse()
}
if ( answers == 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: answer contained no answers" );
+ tqDebug( "DNS Manager: answer contained no answers" );
#endif
ok = ( aa && rd );
}
@@ -790,7 +790,7 @@ void TQDnsAnswer::parse()
// well, it's equal, but it's not the same. so we kill it,
// but use its expiry time.
#if defined(TQDNS_DEBUG)
- qDebug( "killing off old %d for %s, expire was %d",
+ tqDebug( "killing off old %d for %s, expire was %d",
older->t, older->domain->name().latin1(),
rr->expireTime );
#endif
@@ -799,7 +799,7 @@ void TQDnsAnswer::parse()
rr->deleteTime = TQMAX( older->deleteTime, rr->deleteTime );
older->deleteTime = 0;
#if defined(TQDNS_DEBUG)
- qDebug( " adjusted expire is %d", rr->expireTime );
+ tqDebug( " adjusted expire is %d", rr->expireTime );
#endif
}
drrs->next();
@@ -808,7 +808,7 @@ void TQDnsAnswer::parse()
}
#if defined(TQDNS_DEBUG)
- //qDebug( "DNS Manager: ()" );
+ //tqDebug( "DNS Manager: ()" );
#endif
}
@@ -836,7 +836,7 @@ void TQDnsAnswer::notify()
notified.insert( (void*)dns, (void*)42 );
if ( rrs->count() == 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: found no answers!" );
+ tqDebug( "DNS Manager: found no answers!" );
#endif
dns->d->noNames = TRUE;
((TQDnsUgleHack*)dns)->ugle( TRUE );
@@ -846,7 +846,7 @@ void TQDnsAnswer::notify()
((TQDnsUgleHack*)dns)->ugle();
#if defined(TQDNS_DEBUG)
else
- qDebug( "DNS Manager: DNS thing %s not notified for %s",
+ tqDebug( "DNS Manager: DNS thing %s not notified for %s",
dns->label().ascii(), query->l.ascii() );
#endif
}
@@ -902,7 +902,7 @@ static void cleanupDns()
TQDnsManager * TQDnsManager::manager()
{
if ( !globalManager ) {
- qAddPostRoutine(cleanupDns);
+ tqAddPostRoutine(cleanupDns);
new TQDnsManager();
}
return globalManager;
@@ -913,7 +913,7 @@ void TQDnsUgleHack::ugle( bool emitAnyway)
{
if ( emitAnyway || !isWorking() ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: status change for %s (type %d)",
+ tqDebug( "DNS Manager: status change for %s (type %d)",
label().ascii(), recordType() );
#endif
emit resultsReady();
@@ -977,9 +977,9 @@ TQDnsManager::TQDnsManager()
if ( !ns->current() ) {
ns->append( new TQHostAddress(*h) );
#if defined(TQDNS_DEBUG)
- qDebug( "using name server %s", h->toString().latin1() );
+ tqDebug( "using name server %s", h->toString().latin1() );
} else {
- qDebug( "skipping address %s", h->toString().latin1() );
+ tqDebug( "skipping address %s", h->toString().latin1() );
#endif
}
::ns->next();
@@ -1000,9 +1000,9 @@ TQDnsManager::TQDnsManager()
if ( !domains->current() ) {
domains->append( s );
#if defined(TQDNS_DEBUG)
- qDebug( "searching domain %s", s );
+ tqDebug( "searching domain %s", s );
} else {
- qDebug( "skipping domain %s", s );
+ tqDebug( "skipping domain %s", s );
#endif
}
::domains->next();
@@ -1035,7 +1035,7 @@ void TQDnsManager::cleanCache()
TQDnsDomain * d;
Q_UINT32 thisSweep = now();
#if defined(TQDNS_DEBUG)
- qDebug( "TQDnsManager::cleanCache(: Called, time is %u, last was %u",
+ tqDebug( "TQDnsManager::cleanCache(: Called, time is %u, last was %u",
thisSweep, lastSweep );
#endif
@@ -1079,12 +1079,12 @@ void TQDnsManager::answer()
#endif
#if defined(TQDNS_DEBUG)
#if !defined (QT_NO_IPV6)
- qDebug("DNS Manager: answer arrived: %d bytes from %s:%d", r,
+ tqDebug("DNS Manager: answer arrived: %d bytes from %s:%d", r,
useIpv4Socket ? ipv4Socket->peerAddress().toString().ascii()
: ipv6Socket->peerAddress().toString().ascii(),
useIpv4Socket ? ipv4Socket->peerPort() : ipv6Socket->peerPort() );
#else
- qDebug("DNS Manager: answer arrived: %d bytes from %s:%d", r,
+ tqDebug("DNS Manager: answer arrived: %d bytes from %s:%d", r,
ipv4Socket->peerAddress().toString().ascii(), ipv4Socket->peerPort());;
#endif
#endif
@@ -1101,7 +1101,7 @@ void TQDnsManager::answer()
i++;
if ( i == queries.size() ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: bad id (0x%04x) %d", aid, i );
+ tqDebug( "DNS Manager: bad id (0x%04x) %d", aid, i );
#endif
return;
}
@@ -1110,7 +1110,7 @@ void TQDnsManager::answer()
if ( ( (Q_UINT8)(a[2]) & 0x80 ) == 0 ) {
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: received a query" );
+ tqDebug( "DNS Manager: received a query" );
#endif
return;
}
@@ -1159,7 +1159,7 @@ void TQDnsManager::transmitQuery( int i )
// and then get rid of the query
queries.take( i );
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: giving up on query 0x%04x", q->id );
+ tqDebug( "DNS Manager: giving up on query 0x%04x", q->id );
#endif
delete q;
TQTimer::singleShot( 0, TQDnsManager::manager(), SLOT(cleanCache()) );
@@ -1255,7 +1255,7 @@ void TQDnsManager::transmitQuery( int i )
// and then get rid of the query
queries.take( i );
#if defined(TQDNS_DEBUG)
- qDebug( "DNS Manager: no DNS server found on query 0x%04x", q->id );
+ tqDebug( "DNS Manager: no DNS server found on query 0x%04x", q->id );
#endif
delete q;
TQTimer::singleShot( 1000*10, TQDnsManager::manager(), SLOT(cleanCache()) );
@@ -1271,7 +1271,7 @@ void TQDnsManager::transmitQuery( int i )
ipv6Socket->writeBlock( p.data(), pp, receiver, 53 );
#endif
#if defined(TQDNS_DEBUG)
- qDebug( "issuing query 0x%04x (%d) about %s type %d to %s",
+ tqDebug( "issuing query 0x%04x (%d) about %s type %d to %s",
q->id, q->step, q->l.ascii(), q->t,
ns->at( q->step % ns->count() )->toString().ascii() );
#endif
@@ -1289,7 +1289,7 @@ void TQDnsManager::transmitQuery( int i )
ipv6Socket->writeBlock( p.data(), pp, *server, 53 );
#endif
#if defined(TQDNS_DEBUG)
- qDebug( "copying query to %s", server->toString().ascii() );
+ tqDebug( "copying query to %s", server->toString().ascii() );
#endif
}
}
@@ -1408,12 +1408,12 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
TQString s = *it++;
nxdomain = FALSE;
#if defined(TQDNS_DEBUG)
- qDebug( "looking at cache for %s (%s %d)",
+ tqDebug( "looking at cache for %s (%s %d)",
s.ascii(), r->label().ascii(), r->recordType() );
#endif
TQDnsDomain * d = m->domain( s );
#if defined(TQDNS_DEBUG)
- qDebug( " - found %d RRs", d && d->rrs ? d->rrs->count() : 0 );
+ tqDebug( " - found %d RRs", d && d->rrs ? d->rrs->count() : 0 );
#endif
if ( d->rrs )
d->rrs->first();
@@ -1425,7 +1425,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
// cname. if the code is ugly, that may just
// possibly be because the concept is.
#if defined(TQDNS_DEBUG)
- qDebug( "found cname from %s to %s",
+ tqDebug( "found cname from %s to %s",
r->label().ascii(), rr->target.ascii() );
#endif
s = rr->target;
@@ -1472,11 +1472,11 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
// if we found a positive result, return tquickly
if ( answer && l->count() ) {
#if defined(TQDNS_DEBUG)
- qDebug( "found %d records for %s",
+ tqDebug( "found %d records for %s",
l->count(), r->label().ascii() );
l->first();
while( l->current() ) {
- qDebug( " type %d target %s address %s",
+ tqDebug( " type %d target %s address %s",
l->current()->t,
l->current()->target.latin1(),
l->current()->address.toString().latin1() );
@@ -1489,7 +1489,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
#if defined(TQDNS_DEBUG)
if ( nxdomain )
- qDebug( "found NXDomain %s", s.ascii() );
+ tqDebug( "found NXDomain %s", s.ascii() );
#endif
if ( !nxdomain ) {
@@ -1539,7 +1539,7 @@ void TQDnsDomain::sweep( Q_UINT32 thisSweep )
rr->deleteTime = thisSweep; // will hit next time around
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::sweep: %s type %d expires %u %u - %s / %s",
+ tqDebug( "TQDns::sweep: %s type %d expires %u %u - %s / %s",
rr->domain->name().latin1(), rr->t,
rr->expireTime, rr->deleteTime,
rr->target.latin1(), rr->address.toString().latin1());
@@ -1775,10 +1775,10 @@ void TQDns::setLabel( const TQString & label )
setStartQueryTimer(); // start query the next time we enter event loop
#endif
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::setLabel: %d address(es) for %s", n.count(), l.ascii() );
+ tqDebug( "TQDns::setLabel: %d address(es) for %s", n.count(), l.ascii() );
int i = 0;
for( i = 0; i < (int)n.count(); i++ )
- qDebug( "TQDns::setLabel: %d: %s", i, n[i].ascii() );
+ tqDebug( "TQDns::setLabel: %d: %s", i, n[i].ascii() );
#endif
}
@@ -1965,7 +1965,7 @@ TQString TQDns::toInAddrArpaDomain( const TQHostAddress &address )
bool TQDns::isWorking() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::isWorking (%s, %d)", l.ascii(), t );
+ tqDebug( "TQDns::isWorking (%s, %d)", l.ascii(), t );
#endif
if ( t == None )
return FALSE;
@@ -2020,7 +2020,7 @@ bool TQDns::isWorking() const
TQValueList<TQHostAddress> TQDns::addresses() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::addresses (%s)", l.ascii() );
+ tqDebug( "TQDns::addresses (%s)", l.ascii() );
#endif
TQValueList<TQHostAddress> result;
if ( t != A && t != Aaaa )
@@ -2074,7 +2074,7 @@ TQValueList<TQHostAddress> TQDns::addresses() const
TQValueList<TQDns::MailServer> TQDns::mailServers() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::mailServers (%s)", l.ascii() );
+ tqDebug( "TQDns::mailServers (%s)", l.ascii() );
#endif
TQValueList<TQDns::MailServer> result;
if ( t != Mx )
@@ -2131,7 +2131,7 @@ TQValueList<TQDns::MailServer> TQDns::mailServers() const
TQValueList<TQDns::Server> TQDns::servers() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::servers (%s)", l.ascii() );
+ tqDebug( "TQDns::servers (%s)", l.ascii() );
#endif
TQValueList<TQDns::Server> result;
if ( t != Srv )
@@ -2170,7 +2170,7 @@ TQValueList<TQDns::Server> TQDns::servers() const
TQStringList TQDns::hostNames() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::hostNames (%s)", l.ascii() );
+ tqDebug( "TQDns::hostNames (%s)", l.ascii() );
#endif
TQStringList result;
if ( t != Ptr )
@@ -2208,7 +2208,7 @@ TQStringList TQDns::hostNames() const
TQStringList TQDns::texts() const
{
#if defined(TQDNS_DEBUG)
- qDebug( "TQDns::texts (%s)", l.ascii() );
+ tqDebug( "TQDns::texts (%s)", l.ascii() );
#endif
TQStringList result;
if ( t != Txt )
@@ -2475,7 +2475,7 @@ void TQDns::doResInit()
last = searchList.find( separator, first );
if ( last < 0 )
last = searchList.length();
- domains->append( qstrdup( searchList.mid( first, last-first ) ) );
+ domains->append( tqstrdup( searchList.mid( first, last-first ) ) );
first = last+1;
} while( first < (int)searchList.length() );
}
diff --git a/src/network/qftp.cpp b/src/network/qftp.cpp
index ec09fde4e..cb7af95a5 100644
--- a/src/network/qftp.cpp
+++ b/src/network/qftp.cpp
@@ -325,7 +325,7 @@ void TQFtpDTP::writeData()
{
if ( is_ba ) {
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::writeData: write %d bytes", data.ba->size() );
+ tqDebug( "TQFtpDTP::writeData: write %d bytes", data.ba->size() );
#endif
if ( data.ba->size() == 0 )
emit dataTransferProgress( 0, bytesTotal );
@@ -340,7 +340,7 @@ void TQFtpDTP::writeData()
while ( !data.dev->atEnd() && socket.bytesToWrite()==0 ) {
Q_LONG read = data.dev->readBlock( buf, blockSize );
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::writeData: writeBlock() of size %d bytes", (int)read );
+ tqDebug( "TQFtpDTP::writeData: writeBlock() of size %d bytes", (int)read );
#endif
socket.writeBlock( buf, read );
if ( !data.dev )
@@ -375,7 +375,7 @@ inline void TQFtpDTP::clearError()
void TQFtpDTP::abortConnection()
{
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::abortConnection" );
+ tqDebug( "TQFtpDTP::abortConnection" );
#endif
callWriteData = FALSE;
clearData();
@@ -526,7 +526,7 @@ void TQFtpDTP::socketConnected()
bytesDone = 0;
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::connectState( CsConnected )" );
+ tqDebug( "TQFtpDTP::connectState( CsConnected )" );
#endif
emit connectState( TQFtpDTP::CsConnected );
}
@@ -536,7 +536,7 @@ void TQFtpDTP::socketReadyRead()
if ( pi->currentCommand().isEmpty() ) {
socket.close();
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::connectState( CsClosed )" );
+ tqDebug( "TQFtpDTP::connectState( CsClosed )" );
#endif
emit connectState( TQFtpDTP::CsClosed );
return;
@@ -547,7 +547,7 @@ void TQFtpDTP::socketReadyRead()
TQUrlInfo i;
TQString line = socket.readLine();
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP read (list): '%s'", line.latin1() );
+ tqDebug( "TQFtpDTP read (list): '%s'", line.latin1() );
#endif
if ( parseDir( line, "", &i ) ) {
emit listInfo( i );
@@ -570,14 +570,14 @@ void TQFtpDTP::socketReadyRead()
ba.resize( bytesRead );
bytesDone += bytesRead;
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP read: %d bytes (total %d bytes)", (int)bytesRead, bytesDone );
+ tqDebug( "TQFtpDTP read: %d bytes (total %d bytes)", (int)bytesRead, bytesDone );
#endif
emit dataTransferProgress( bytesDone, bytesTotal );
if (data.dev) // make sure it wasn't deleted in the slot
data.dev->writeBlock( ba );
} else {
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP readyRead: %d bytes available (total %d bytes read)", (int)bytesAvailable(), bytesDone );
+ tqDebug( "TQFtpDTP readyRead: %d bytes available (total %d bytes read)", (int)bytesAvailable(), bytesDone );
#endif
emit dataTransferProgress( bytesDone+socket.bytesAvailable(), bytesTotal );
emit readyRead();
@@ -589,12 +589,12 @@ void TQFtpDTP::socketError( int e )
{
if ( e == TQSocket::ErrHostNotFound ) {
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::connectState( CsHostNotFound )" );
+ tqDebug( "TQFtpDTP::connectState( CsHostNotFound )" );
#endif
emit connectState( TQFtpDTP::CsHostNotFound );
} else if ( e == TQSocket::ErrConnectionRefused ) {
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::connectState( CsConnectionRefused )" );
+ tqDebug( "TQFtpDTP::connectState( CsConnectionRefused )" );
#endif
emit connectState( TQFtpDTP::CsConnectionRefused );
}
@@ -606,7 +606,7 @@ void TQFtpDTP::socketConnectionClosed()
clearData();
}
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::connectState( CsClosed )" );
+ tqDebug( "TQFtpDTP::connectState( CsClosed )" );
#endif
emit connectState( TQFtpDTP::CsClosed );
}
@@ -615,7 +615,7 @@ void TQFtpDTP::socketBytesWritten( int bytes )
{
bytesDone += bytes;
#if defined(TQFTPDTP_DEBUG)
- qDebug( "TQFtpDTP::bytesWritten( %d )", bytesDone );
+ tqDebug( "TQFtpDTP::bytesWritten( %d )", bytesDone );
#endif
emit dataTransferProgress( bytesDone, bytesTotal );
if ( callWriteData )
@@ -701,7 +701,7 @@ void TQFtpPI::abort()
abortState = AbortStarted;
#if defined(TQFTPPI_DEBUG)
- qDebug( "TQFtpPI send: ABOR" );
+ tqDebug( "TQFtpPI send: ABOR" );
#endif
commandSocket.writeBlock( "ABOR\r\n", 6 );
@@ -718,7 +718,7 @@ void TQFtpPI::connected()
{
state = Begin;
#if defined(TQFTPPI_DEBUG)
-// qDebug( "TQFtpPI state: %d [connected()]", state );
+// tqDebug( "TQFtpPI state: %d [connected()]", state );
#endif
emit connectState( TQFtp::Connected );
}
@@ -807,11 +807,11 @@ void TQFtpPI::readyRead()
bool TQFtpPI::processReply()
{
#if defined(TQFTPPI_DEBUG)
-// qDebug( "TQFtpPI state: %d [processReply() begin]", state );
+// tqDebug( "TQFtpPI state: %d [processReply() begin]", state );
if ( replyText.length() < 400 )
- qDebug( "TQFtpPI recv: %d %s", 100*replyCode[0]+10*replyCode[1]+replyCode[2], replyText.latin1() );
+ tqDebug( "TQFtpPI recv: %d %s", 100*replyCode[0]+10*replyCode[1]+replyCode[2], replyText.latin1() );
else
- qDebug( "TQFtpPI recv: %d (text skipped)", 100*replyCode[0]+10*replyCode[1]+replyCode[2] );
+ tqDebug( "TQFtpPI recv: %d (text skipped)", 100*replyCode[0]+10*replyCode[1]+replyCode[2] );
#endif
// process 226 replies ("Closing Data Connection") only when the data
@@ -861,7 +861,7 @@ bool TQFtpPI::processReply()
return TRUE;
}
#if defined(TQFTPPI_DEBUG)
-// qDebug( "TQFtpPI state: %d [processReply() intermediate]", state );
+// tqDebug( "TQFtpPI state: %d [processReply() intermediate]", state );
#endif
// special actions on certain replies
@@ -878,7 +878,7 @@ bool TQFtpPI::processReply()
TQRegExp addrPortPattern("(\\d+),(\\d+),(\\d+),(\\d+),(\\d+),(\\d+)");
if (addrPortPattern.search(replyText) == -1) {
#if defined(TQFTPPI_DEBUG)
- qDebug( "TQFtp: bad 227 response -- address and port information missing" );
+ tqDebug( "TQFtp: bad 227 response -- address and port information missing" );
#endif
// ### error handling
} else {
@@ -930,13 +930,13 @@ bool TQFtpPI::processReply()
break;
}
#if defined(TQFTPPI_DEBUG)
-// qDebug( "TQFtpPI state: %d [processReply() end]", state );
+// tqDebug( "TQFtpPI state: %d [processReply() end]", state );
#endif
return TRUE;
}
#ifndef QT_NO_TEXTCODEC
-TQM_EXPORT_FTP TQTextCodec *qt_ftp_filename_codec = 0;
+TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = 0;
#endif
/*
@@ -951,7 +951,7 @@ bool TQFtpPI::startNextCmd()
#if defined(TQFTPPI_DEBUG)
if ( state != Idle )
- qDebug( "TQFtpPI startNextCmd: Internal error! TQFtpPI called in non-Idle state %d", state );
+ tqDebug( "TQFtpPI startNextCmd: Internal error! TQFtpPI called in non-Idle state %d", state );
#endif
if ( pendingCommands.isEmpty() ) {
currentCmd = TQString::null;
@@ -961,13 +961,13 @@ bool TQFtpPI::startNextCmd()
currentCmd = pendingCommands.first();
pendingCommands.pop_front();
#if defined(TQFTPPI_DEBUG)
- qDebug( "TQFtpPI send: %s", currentCmd.left( currentCmd.length()-2 ).latin1() );
+ tqDebug( "TQFtpPI send: %s", currentCmd.left( currentCmd.length()-2 ).latin1() );
#endif
state = Waiting;
#ifndef QT_NO_TEXTCODEC
- if ( qt_ftp_filename_codec ) {
+ if ( tqt_ftp_filename_codec ) {
int len = 0;
- TQCString enc = qt_ftp_filename_codec->fromUnicode(currentCmd,len);
+ TQCString enc = tqt_ftp_filename_codec->fromUnicode(currentCmd,len);
commandSocket.writeBlock( enc.data(), len );
} else
#endif
@@ -1042,7 +1042,7 @@ static TQFtpPrivate* d( const TQFtp* foo )
if ( !d_ptr ) {
d_ptr = new TQPtrDict<TQFtpPrivate>;
d_ptr->setAutoDelete( TRUE );
- qAddPostRoutine( cleanup_d_ptr );
+ tqAddPostRoutine( cleanup_d_ptr );
}
TQFtpPrivate* ret = d_ptr->find( (void*)foo );
if ( ! ret ) {
@@ -1093,7 +1093,7 @@ static void delete_d( const TQFtp* foo )
\endcode
This code will only work if the TQFtp class is registered; to
- register the class, you must call qInitNetworkProtocols() before
+ register the class, you must call tqInitNetworkProtocols() before
using a TQUrlOperator with TQFtp.
The rest of this descrption describes the direct interface to FTP.
diff --git a/src/network/qhttp.cpp b/src/network/qhttp.cpp
index b8a110e58..1962557bb 100644
--- a/src/network/qhttp.cpp
+++ b/src/network/qhttp.cpp
@@ -1039,7 +1039,7 @@ TQString TQHttpRequestHeader::toString() const
\endcode
This code will only work if the TQHttp class is registered; to
- register the class, you must call qInitNetworkProtocols() before
+ register the class, you must call tqInitNetworkProtocols() before
using a TQUrlOperator with HTTP.
The TQNetworkProtocol interface for HTTP only supports the
@@ -1435,7 +1435,7 @@ void TQHttp::abort()
Q_ULONG TQHttp::bytesAvailable() const
{
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp::bytesAvailable(): %d bytes", (int)d->rba.size() );
+ tqDebug( "TQHttp::bytesAvailable(): %d bytes", (int)d->rba.size() );
#endif
return d->rba.size();
}
@@ -1450,7 +1450,7 @@ Q_LONG TQHttp::readBlock( char *data, Q_ULONG maxlen )
{
if ( data == 0 && maxlen != 0 ) {
#if defined(QT_CHECK_NULL)
- qWarning( "TQHttp::readBlock: Null pointer error" );
+ tqWarning( "TQHttp::readBlock: Null pointer error" );
#endif
return -1;
}
@@ -1460,7 +1460,7 @@ Q_LONG TQHttp::readBlock( char *data, Q_ULONG maxlen )
d->bytesDone += maxlen;
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp::readBlock(): read %d bytes (%d bytes done)", (int)maxlen, d->bytesDone );
+ tqDebug( "TQHttp::readBlock(): read %d bytes (%d bytes done)", (int)maxlen, d->bytesDone );
#endif
return maxlen;
}
@@ -1880,7 +1880,7 @@ void TQHttp::slotConnected()
d->bytesTotal = str.length();
d->socket.writeBlock( str.latin1(), d->bytesTotal );
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp: write request header:\n---{\n%s}---", str.latin1() );
+ tqDebug( "TQHttp: write request header:\n---{\n%s}---", str.latin1() );
#endif
if ( d->postDevice ) {
@@ -1927,7 +1927,7 @@ void TQHttp::slotBytesWritten( int written )
int n = d->postDevice->readBlock( arr.data(), max );
if ( n != max ) {
- qWarning("Could not read enough bytes from the device");
+ tqWarning("Could not read enough bytes from the device");
close();
return;
}
@@ -1965,12 +1965,12 @@ void TQHttp::slotReadyRead()
return;
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp: read response header:\n---{\n%s}---", d->headerStr.latin1() );
+ tqDebug( "TQHttp: read response header:\n---{\n%s}---", d->headerStr.latin1() );
#endif
d->response = TQHttpResponseHeader( d->headerStr );
d->headerStr = "";
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp: read response header:\n---{\n%s}---", d->response.toString().latin1() );
+ tqDebug( "TQHttp: read response header:\n---{\n%s}---", d->response.toString().latin1() );
#endif
// Check header
if ( !d->response.isValid() ) {
@@ -2089,7 +2089,7 @@ void TQHttp::slotReadyRead()
delete arr;
d->bytesDone += n;
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp::slotReadyRead(): read %ld bytes (%d bytes done)", n, d->bytesDone );
+ tqDebug( "TQHttp::slotReadyRead(): read %ld bytes (%d bytes done)", n, d->bytesDone );
#endif
if ( d->response.hasContentLength() )
emit dataReadProgress( d->bytesDone, d->response.contentLength() );
@@ -2098,7 +2098,7 @@ void TQHttp::slotReadyRead()
} else {
d->rba.append( arr );
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp::slotReadyRead(): read %ld bytes (%ld bytes done)", n, d->bytesDone + bytesAvailable() );
+ tqDebug( "TQHttp::slotReadyRead(): read %ld bytes (%ld bytes done)", n, d->bytesDone + bytesAvailable() );
#endif
if ( d->response.hasContentLength() )
emit dataReadProgress( d->bytesDone + bytesAvailable(), d->response.contentLength() );
@@ -2185,7 +2185,7 @@ void TQHttp::killIdleTimer()
void TQHttp::setState( int s )
{
#if defined(TQHTTP_DEBUG)
- qDebug( "TQHttp state changed %d -> %d", d->state, s );
+ tqDebug( "TQHttp state changed %d -> %d", d->state, s );
#endif
d->state = (State)s;
emit stateChanged( s );
diff --git a/src/network/qnetwork.cpp b/src/network/qnetwork.cpp
index a3e8a7443..47c1c7ad5 100644
--- a/src/network/qnetwork.cpp
+++ b/src/network/qnetwork.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Implementation of qInitNetworkProtocols function.
+** Implementation of tqInitNetworkProtocols function.
**
** Created : 970521
**
@@ -58,7 +58,7 @@
This function is declared in \l ntqnetwork.h.
*/
-void qInitNetworkProtocols()
+void tqInitNetworkProtocols()
{
#ifndef QT_NO_NETWORKPROTOCOL_FTP
TQNetworkProtocol::registerNetworkProtocol( "ftp", new TQNetworkProtocolFactory< TQFtp > );
diff --git a/src/network/qserversocket.cpp b/src/network/qserversocket.cpp
index 04dc965ef..840ee231c 100644
--- a/src/network/qserversocket.cpp
+++ b/src/network/qserversocket.cpp
@@ -176,7 +176,7 @@ void TQServerSocket::init( const TQHostAddress & address, Q_UINT16 port, int bac
connect( d->n, SIGNAL(activated(int)),
this, SLOT(incomingConnection(int)) );
} else {
- qWarning( "TQServerSocket: failed to bind or listen to the socket" );
+ tqWarning( "TQServerSocket: failed to bind or listen to the socket" );
delete d->s;
d->s = 0;
}
diff --git a/src/network/qsocket.cpp b/src/network/qsocket.cpp
index 8e69aa7cc..10cd2173e 100644
--- a/src/network/qsocket.cpp
+++ b/src/network/qsocket.cpp
@@ -321,7 +321,7 @@ TQSocket::TQSocket( TQObject *parent, const char *name )
TQSocket::~TQSocket()
{
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): Destroy", name() );
+ tqDebug( "TQSocket (%s): Destroy", name() );
#endif
if ( state() != Idle )
close();
@@ -411,7 +411,7 @@ TQSocket::State TQSocket::state() const
void TQSocket::connectToHost( const TQString &host, Q_UINT16 port )
{
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::connectToHost: host %s, port %d",
+ tqDebug( "TQSocket (%s)::connectToHost: host %s, port %d",
name(), host.ascii(), port );
#endif
setSocketIntern( -1 );
@@ -442,7 +442,7 @@ void TQSocket::connectToHost( const TQString &host, Q_UINT16 port )
void TQSocket::tryConnecting()
{
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::tryConnecting()", name() );
+ tqDebug( "TQSocket (%s)::tryConnecting()", name() );
#endif
// ### this ifdef isn't correct - addresses() also does /etc/hosts and
// numeric-address-as-string handling.
@@ -452,7 +452,7 @@ void TQSocket::tryConnecting()
d->l4 = d->dns4->addresses();
if ( !d->l4.isEmpty() || !d->dns4->isWorking() ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: "
+ tqDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: "
"%d IPv4 addresses",
name(), d->host.ascii(), d->port, d->l4.count() );
#endif
@@ -465,7 +465,7 @@ void TQSocket::tryConnecting()
d->l6 = d->dns6->addresses();
if ( !d->l6.isEmpty() || !d->dns6->isWorking() ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: "
+ tqDebug( "TQSocket (%s)::tryConnecting: host %s, port %d: "
"%d IPv6 addresses",
name(), d->host.ascii(), d->port, d->l6.count() );
#endif
@@ -516,7 +516,7 @@ void TQSocket::tryConnecting()
}
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::tryConnecting: "
+ tqDebug( "TQSocket (%s)::tryConnecting: "
"Gave up on IP address %s",
name(), d->socket->peerAddress().toString().ascii() );
#endif
@@ -539,7 +539,7 @@ void TQSocket::tryConnecting()
d->setSocketDevice( this, 0 );
stuck = TRUE;
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s",
+ tqDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s",
name(), d->addr.toString().ascii() );
#endif
}
@@ -654,7 +654,7 @@ bool TQSocket::open( int m )
{
if ( isOpen() ) {
#if defined(QT_CHECK_STATE)
- qWarning( "TQSocket::open: Already open" );
+ tqWarning( "TQSocket::open: Already open" );
#endif
return FALSE;
}
@@ -692,7 +692,7 @@ void TQSocket::close()
if ( !d->rsn || !d->wsn )
return;
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): close socket", name() );
+ tqDebug( "TQSocket (%s): close socket", name() );
#endif
if ( d->socket && d->wsize ) { // there's data to be written
d->state = Closing;
@@ -721,7 +721,7 @@ bool TQSocket::consumeWriteBuf( Q_ULONG nbytes )
if ( nbytes <= 0 || nbytes > d->wsize )
return FALSE;
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes );
+ tqDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes );
#endif
d->wsize -= nbytes;
for ( ;; ) {
@@ -754,7 +754,7 @@ void TQSocket::flush()
int consumed = 0;
while ( !osBufferFull && d->state >= Connecting && d->wsize > 0 ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): flush: Write data to the socket", name() );
+ tqDebug( "TQSocket (%s): flush: Write data to the socket", name() );
#endif
TQByteArray *a = d->wba.first();
int nwritten;
@@ -798,14 +798,14 @@ void TQSocket::flush()
}
if ( consumed > 0 ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): flush: wrote %d bytes, %d left",
+ tqDebug( "TQSocket (%s): flush: wrote %d bytes, %d left",
name(), consumed, (int)d->wsize );
#endif
emit bytesWritten( consumed );
}
if ( d->state == Closing && d->wsize == 0 ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): flush: Delayed close done. Terminating.",
+ tqDebug( "TQSocket (%s): flush: Delayed close done. Terminating.",
name() );
#endif
setFlags( IO_Sequential );
@@ -981,20 +981,20 @@ Q_LONG TQSocket::readBlock( char *data, Q_ULONG maxlen )
{
if ( data == 0 && maxlen != 0 ) {
#if defined(QT_CHECK_NULL)
- qWarning( "TQSocket::readBlock: Null pointer error" );
+ tqWarning( "TQSocket::readBlock: Null pointer error" );
#endif
return -1;
}
if ( !isOpen() ) {
#if defined(QT_CHECK_STATE)
- qWarning( "TQSocket::readBlock: Socket is not open" );
+ tqWarning( "TQSocket::readBlock: Socket is not open" );
#endif
return -1;
}
if ( maxlen >= d->rba.size() )
maxlen = d->rba.size();
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): readBlock %d bytes", name(), (int)maxlen );
+ tqDebug( "TQSocket (%s): readBlock %d bytes", name(), (int)maxlen );
#endif
d->rba.consumeBytes( maxlen, data );
// After we read data from our internal buffer, if we use the
@@ -1019,18 +1019,18 @@ Q_LONG TQSocket::writeBlock( const char *data, Q_ULONG len )
{
#if defined(QT_CHECK_NULL)
if ( data == 0 && len != 0 ) {
- qWarning( "TQSocket::writeBlock: Null pointer error" );
+ tqWarning( "TQSocket::writeBlock: Null pointer error" );
}
#endif
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) {
- qWarning( "TQSocket::writeBlock: Socket is not open" );
+ tqWarning( "TQSocket::writeBlock: Socket is not open" );
return -1;
}
#endif
#if defined(QT_CHECK_STATE)
if ( d->state == Closing ) {
- qWarning( "TQSocket::writeBlock: Cannot write, socket is closing" );
+ tqWarning( "TQSocket::writeBlock: Cannot write, socket is closing" );
}
#endif
if ( len == 0 || d->state == Closing || d->state == Idle )
@@ -1061,7 +1061,7 @@ Q_LONG TQSocket::writeBlock( const char *data, Q_ULONG len )
else if ( d->wsn )
d->wsn->setEnabled( TRUE );
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len );
+ tqDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len );
#endif
return len;
}
@@ -1121,7 +1121,7 @@ int TQSocket::ungetch( int ch )
{
#if defined(QT_CHECK_STATE)
if ( !isOpen() ) {
- qWarning( "TQSocket::ungetch: Socket not open" );
+ tqWarning( "TQSocket::ungetch: Socket not open" );
return -1;
}
#endif
@@ -1243,7 +1243,7 @@ void TQSocket::sn_read( bool force )
if ( nread == 0 ) { // really closed
if ( !d->socket->isOpen() ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): sn_read: Connection closed", name() );
+ tqDebug( "TQSocket (%s): sn_read: Connection closed", name() );
#endif
d->connectionClosed();
emit connectionClosed();
@@ -1258,7 +1258,7 @@ void TQSocket::sn_read( bool force )
return;
}
#if defined(TQSOCKET_DEBUG)
- qWarning( "TQSocket::sn_read (%s): Close error", name() );
+ tqWarning( "TQSocket::sn_read (%s): Close error", name() );
#endif
if ( d->rsn )
d->rsn->setEnabled( FALSE );
@@ -1272,7 +1272,7 @@ void TQSocket::sn_read( bool force )
} else { // data to be read
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): sn_read: %ld incoming bytes", name(), nbytes );
+ tqDebug( "TQSocket (%s): sn_read: %ld incoming bytes", name(), nbytes );
#endif
if ( nbytes > (int)sizeof(buf) ) {
// big
@@ -1289,7 +1289,7 @@ void TQSocket::sn_read( bool force )
}
if ( nread == 0 ) {
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): sn_read: Connection closed", name() );
+ tqDebug( "TQSocket (%s): sn_read: Connection closed", name() );
#endif
// ### we should rather ask the socket device if it is closed
d->connectionClosed();
@@ -1306,7 +1306,7 @@ void TQSocket::sn_read( bool force )
return;
}
#if defined(QT_CHECK_RANGE)
- qWarning( "TQSocket::sn_read: Read error" );
+ tqWarning( "TQSocket::sn_read: Read error" );
#endif
if ( d->rsn )
d->rsn->setEnabled( FALSE );
@@ -1316,7 +1316,7 @@ void TQSocket::sn_read( bool force )
}
if ( nread != (int)a->size() ) { // unexpected
#if defined(CHECK_RANGE) && !defined(Q_OS_WIN32)
- qWarning( "TQSocket::sn_read: Unexpected short read" );
+ tqWarning( "TQSocket::sn_read: Unexpected short read" );
#endif
a->resize( nread );
}
@@ -1356,7 +1356,7 @@ void TQSocket::tryConnection()
if ( d->socket->connect( d->addr, d->port ) ) {
d->state = Connected;
#if defined(TQSOCKET_DEBUG)
- qDebug( "TQSocket (%s): sn_write: Got connection to %s",
+ tqDebug( "TQSocket (%s): sn_write: Got connection to %s",
name(), peerName().ascii() );
#endif
if ( d->rsn )
diff --git a/src/network/qsocketdevice.cpp b/src/network/qsocketdevice.cpp
index c09cbb59a..7be3accb1 100644
--- a/src/network/qsocketdevice.cpp
+++ b/src/network/qsocketdevice.cpp
@@ -163,7 +163,7 @@ TQSocketDevice::TQSocketDevice( int socket, Type type )
d(new TQSocketDevicePrivate(Unknown))
{
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice: Created TQSocketDevice %p (socket %x, type %d)",
+ tqDebug( "TQSocketDevice: Created TQSocketDevice %p (socket %x, type %d)",
this, socket, type );
#endif
init();
@@ -186,7 +186,7 @@ TQSocketDevice::TQSocketDevice( Type type )
d(new TQSocketDevicePrivate(IPv4))
{
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice: Created TQSocketDevice object %p, type %d",
+ tqDebug( "TQSocketDevice: Created TQSocketDevice object %p, type %d",
this, type );
#endif
init();
@@ -215,7 +215,7 @@ TQSocketDevice::TQSocketDevice( Type type, Protocol protocol, int )
d(new TQSocketDevicePrivate(protocol))
{
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice: Created TQSocketDevice object %p, type %d",
+ tqDebug( "TQSocketDevice: Created TQSocketDevice object %p, type %d",
this, type );
#endif
init();
@@ -231,7 +231,7 @@ TQSocketDevice::~TQSocketDevice()
delete d;
d = 0;
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice: Destroyed TQSocketDevice %p", this );
+ tqDebug( "TQSocketDevice: Destroyed TQSocketDevice %p", this );
#endif
}
@@ -308,7 +308,7 @@ void TQSocketDevice::setSocket( int socket, Type type )
if ( fd != -1 ) // close any open socket
close();
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice::setSocket: socket %x, type %d", socket, type );
+ tqDebug( "TQSocketDevice::setSocket: socket %x, type %d", socket, type );
#endif
t = type;
fd = socket;
@@ -335,7 +335,7 @@ bool TQSocketDevice::open( int mode )
if ( isOpen() || !isValid() )
return FALSE;
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice::open: mode %x", mode );
+ tqDebug( "TQSocketDevice::open: mode %x", mode );
#endif
setMode( mode & IO_ReadWrite );
setState( IO_Open );
diff --git a/src/network/qsocketdevice_unix.cpp b/src/network/qsocketdevice_unix.cpp
index a5adfef06..2d359f218 100644
--- a/src/network/qsocketdevice_unix.cpp
+++ b/src/network/qsocketdevice_unix.cpp
@@ -224,7 +224,7 @@ void TQSocketDevice::close()
setState( 0 );
::close( fd );
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice::close: Closed socket %x", fd );
+ tqDebug( "TQSocketDevice::close: Closed socket %x", fd );
#endif
fd = -1;
fetchConnectionParameters();
@@ -268,7 +268,7 @@ bool TQSocketDevice::blocking() const
void TQSocketDevice::setBlocking( bool enable )
{
#if defined(TQSOCKETDEVICE_DEBUG)
- qDebug( "TQSocketDevice::setBlocking( %d )", enable );
+ tqDebug( "TQSocketDevice::setBlocking( %d )", enable );
#endif
if ( !isValid() )
return;
@@ -760,20 +760,20 @@ Q_LONG TQSocketDevice::readBlock( char *data, Q_ULONG maxlen )
{
#if defined(QT_CHECK_NULL)
if ( data == 0 && maxlen != 0 ) {
- qWarning( "TQSocketDevice::readBlock: Null pointer error" );
+ tqWarning( "TQSocketDevice::readBlock: Null pointer error" );
}
#endif
#if defined(QT_CHECK_STATE)
if ( !isValid() ) {
- qWarning( "TQSocketDevice::readBlock: Invalid socket" );
+ tqWarning( "TQSocketDevice::readBlock: Invalid socket" );
return -1;
}
if ( !isOpen() ) {
- qWarning( "TQSocketDevice::readBlock: Device is not open" );
+ tqWarning( "TQSocketDevice::readBlock: Device is not open" );
return -1;
}
if ( !isReadable() ) {
- qWarning( "TQSocketDevice::readBlock: Read operation not permitted" );
+ tqWarning( "TQSocketDevice::readBlock: Read operation not permitted" );
return -1;
}
#endif
@@ -851,25 +851,25 @@ Q_LONG TQSocketDevice::writeBlock( const char *data, Q_ULONG len )
{
if ( data == 0 && len != 0 ) {
#if defined(QT_CHECK_NULL) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::writeBlock: Null pointer error" );
+ tqWarning( "TQSocketDevice::writeBlock: Null pointer error" );
#endif
return -1;
}
if ( !isValid() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::writeBlock: Invalid socket" );
+ tqWarning( "TQSocketDevice::writeBlock: Invalid socket" );
#endif
return -1;
}
if ( !isOpen() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::writeBlock: Device is not open" );
+ tqWarning( "TQSocketDevice::writeBlock: Device is not open" );
#endif
return -1;
}
if ( !isWritable() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::writeBlock: Write operation not permitted" );
+ tqWarning( "TQSocketDevice::writeBlock: Write operation not permitted" );
#endif
return -1;
}
@@ -939,32 +939,32 @@ Q_LONG TQSocketDevice::writeBlock( const char * data, Q_ULONG len,
{
if ( t != Datagram ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::sendBlock: Not datagram" );
+ tqWarning( "TQSocketDevice::sendBlock: Not datagram" );
#endif
return -1; // for now - later we can do t/tcp
}
if ( data == 0 && len != 0 ) {
#if defined(QT_CHECK_NULL) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::sendBlock: Null pointer error" );
+ tqWarning( "TQSocketDevice::sendBlock: Null pointer error" );
#endif
return -1;
}
if ( !isValid() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::sendBlock: Invalid socket" );
+ tqWarning( "TQSocketDevice::sendBlock: Invalid socket" );
#endif
return -1;
}
if ( !isOpen() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::sendBlock: Device is not open" );
+ tqWarning( "TQSocketDevice::sendBlock: Device is not open" );
#endif
return -1;
}
if ( !isWritable() ) {
#if defined(QT_CHECK_STATE) || defined(TQSOCKETDEVICE_DEBUG)
- qWarning( "TQSocketDevice::sendBlock: Write operation not permitted" );
+ tqWarning( "TQSocketDevice::sendBlock: Write operation not permitted" );
#endif
return -1;
}