summaryrefslogtreecommitdiffstats
path: root/kdecore/network
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore/network')
-rw-r--r--kdecore/network/Makefile.am2
-rw-r--r--kdecore/network/kbufferedsocket.cpp24
-rw-r--r--kdecore/network/kbufferedsocket.h18
-rw-r--r--kdecore/network/kclientsocketbase.cpp32
-rw-r--r--kdecore/network/kclientsocketbase.h22
-rw-r--r--kdecore/network/kdatagramsocket.cpp6
-rw-r--r--kdecore/network/kdatagramsocket.h6
-rw-r--r--kdecore/network/khttpproxysocketdevice.cpp14
-rw-r--r--kdecore/network/kiobuffer.h10
-rw-r--r--kdecore/network/knetworkinterface.h2
-rw-r--r--kdecore/network/kresolver.cpp60
-rw-r--r--kdecore/network/kresolver.h28
-rw-r--r--kdecore/network/kresolver_p.h8
-rw-r--r--kdecore/network/kresolvermanager.cpp28
-rw-r--r--kdecore/network/kresolverstandardworkers.cpp46
-rw-r--r--kdecore/network/kresolverstandardworkers_p.h2
-rw-r--r--kdecore/network/kresolverworkerbase.h4
-rw-r--r--kdecore/network/kreverseresolver.cpp6
-rw-r--r--kdecore/network/kreverseresolver.h6
-rw-r--r--kdecore/network/kserversocket.cpp4
-rw-r--r--kdecore/network/kserversocket.h4
-rw-r--r--kdecore/network/ksocketaddress.cpp86
-rw-r--r--kdecore/network/ksocketaddress.h60
-rw-r--r--kdecore/network/ksocketbase.h32
-rw-r--r--kdecore/network/ksocketbuffer.cpp36
-rw-r--r--kdecore/network/ksocketbuffer_p.h20
-rw-r--r--kdecore/network/ksocketdevice.cpp20
-rw-r--r--kdecore/network/ksocketdevice.h18
-rw-r--r--kdecore/network/ksockssocketdevice.cpp14
-rw-r--r--kdecore/network/ksockssocketdevice.h12
-rw-r--r--kdecore/network/ksrvresolverworker.cpp10
-rw-r--r--kdecore/network/ksrvresolverworker_p.h8
-rw-r--r--kdecore/network/kstreamsocket.cpp2
33 files changed, 325 insertions, 325 deletions
diff --git a/kdecore/network/Makefile.am b/kdecore/network/Makefile.am
index 71ed013d9..b82eaa715 100644
--- a/kdecore/network/Makefile.am
+++ b/kdecore/network/Makefile.am
@@ -55,5 +55,5 @@ noinst_HEADERS = kresolver_p.h \
configdir = $(kde_confdir)
config_DATA = ipv6blacklist
-# let automoc handle all of the meta source files (moc)
+# let autotqmoc handle all of the meta source files (tqmoc)
METASOURCES = AUTO
diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp
index 04115c051..85b433193 100644
--- a/kdecore/network/kbufferedsocket.cpp
+++ b/kdecore/network/kbufferedsocket.cpp
@@ -94,7 +94,7 @@ void KBufferedSocket::close()
}
#ifdef USE_QT3
-Q_LONG KBufferedSocket::bytesAvailable() const
+TQ_LONG KBufferedSocket::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KBufferedSocket::bytesAvailable() const
@@ -106,9 +106,9 @@ qint64 KBufferedSocket::bytesAvailable() const
return d->input->length();
}
-Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
+TQ_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
{
- Q_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
+ TQ_LONG retval = KStreamSocket::waitForMore(msecs, timeout);
if (d->input)
{
resetError();
@@ -118,7 +118,7 @@ Q_LONG KBufferedSocket::waitForMore(int msecs, bool *timeout)
return retval;
}
-Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -134,13 +134,13 @@ Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen)
return KStreamSocket::readBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KBufferedSocket::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
from = peerAddress();
return readBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen)
{
if (d->input)
{
@@ -156,13 +156,13 @@ Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen)
return KStreamSocket::peekBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KBufferedSocket::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
from = peerAddress();
return peekBlock(data, maxlen);
}
-Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG len)
{
if (state() != Connected)
{
@@ -192,7 +192,7 @@ Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG len)
return KStreamSocket::writeBlock(data, len);
}
-Q_LONG KBufferedSocket::writeBlock(const char *data, Q_ULONG maxlen,
+TQ_LONG KBufferedSocket::writeBlock(const char *data, TQ_ULONG maxlen,
const KSocketAddress&)
{
// ignore the third parameter
@@ -285,7 +285,7 @@ KIOBufferBase* KBufferedSocket::outputBuffer()
}
#ifdef USE_QT3
-Q_ULONG KBufferedSocket::bytesToWrite() const
+TQ_ULONG KBufferedSocket::bytesToWrite() const
#endif
#ifdef USE_QT4
qint64 KBufferedSocket::bytesToWrite() const
@@ -332,7 +332,7 @@ void KBufferedSocket::slotReadActivity()
if (d->input && state() == Connected)
{
mutex()->lock();
- Q_LONG len = d->input->receiveFrom(socketDevice());
+ TQ_LONG len = d->input->receiveFrom(socketDevice());
if (len == -1)
{
@@ -380,7 +380,7 @@ void KBufferedSocket::slotWriteActivity()
(state() == Connected || state() == Closing))
{
mutex()->lock();
- Q_LONG len = d->output->sendTo(socketDevice());
+ TQ_LONG len = d->output->sendTo(socketDevice());
if (len == -1)
{
diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h
index bca034002..3dd09af43 100644
--- a/kdecore/network/kbufferedsocket.h
+++ b/kdecore/network/kbufferedsocket.h
@@ -99,7 +99,7 @@ public:
* Make use of the buffers.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -108,12 +108,12 @@ public:
/**
* Make use of buffers.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from the socket. Make use of buffers.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
@@ -121,12 +121,12 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data from the socket.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
@@ -134,12 +134,12 @@ public:
*
* The @p from parameter is always set to @ref peerAddress()
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
/**
* Writes data to the socket.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* @overload
@@ -147,7 +147,7 @@ public:
*
* The @p to parameter is discarded.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Catch changes.
@@ -183,7 +183,7 @@ public:
* Returns the length of the output buffer.
*/
#ifdef USE_QT3
- virtual Q_ULONG bytesToWrite() const;
+ virtual TQ_ULONG bytesToWrite() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesToWrite() const;
diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp
index 7ac3ca3b1..5cb87d391 100644
--- a/kdecore/network/kclientsocketbase.cpp
+++ b/kdecore/network/kclientsocketbase.cpp
@@ -140,7 +140,7 @@ bool KClientSocketBase::lookup()
{
if (d->localResolver.serviceName().isNull() &&
!d->localResolver.nodeName().isNull())
- d->localResolver.setServiceName(TQString::fromLatin1(""));
+ d->localResolver.setServiceName(TQString::tqfromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
@@ -279,7 +279,7 @@ void KClientSocketBase::close()
// This function is unlike all the others because it is const
#ifdef USE_QT3
-Q_LONG KClientSocketBase::bytesAvailable() const
+TQ_LONG KClientSocketBase::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KClientSocketBase::bytesAvailable() const
@@ -291,10 +291,10 @@ qint64 KClientSocketBase::bytesAvailable() const
// All the functions below look really alike
// Should I use a macro to define them?
-Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
+TQ_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
{
resetError();
- Q_LONG retval = socketDevice()->waitForMore(msecs, timeout);
+ TQ_LONG retval = socketDevice()->waitForMore(msecs, timeout);
if (retval == -1)
{
copyError();
@@ -303,10 +303,10 @@ Q_LONG KClientSocketBase::waitForMore(int msecs, bool *timeout)
return retval;
}
-Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
- Q_LONG retval = socketDevice()->readBlock(data, maxlen);
+ TQ_LONG retval = socketDevice()->readBlock(data, maxlen);
if (retval == -1)
{
copyError();
@@ -315,10 +315,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KClientSocketBase::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
- Q_LONG retval = socketDevice()->readBlock(data, maxlen, from);
+ TQ_LONG retval = socketDevice()->readBlock(data, maxlen, from);
if (retval == -1)
{
copyError();
@@ -327,10 +327,10 @@ Q_LONG KClientSocketBase::readBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
- Q_LONG retval = socketDevice()->peekBlock(data, maxlen);
+ TQ_LONG retval = socketDevice()->peekBlock(data, maxlen);
if (retval == -1)
{
copyError();
@@ -339,10 +339,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KClientSocketBase::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
- Q_LONG retval = socketDevice()->peekBlock(data, maxlen, from);
+ TQ_LONG retval = socketDevice()->peekBlock(data, maxlen, from);
if (retval == -1)
{
copyError();
@@ -351,10 +351,10 @@ Q_LONG KClientSocketBase::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len)
{
resetError();
- Q_LONG retval = socketDevice()->writeBlock(data, len);
+ TQ_LONG retval = socketDevice()->writeBlock(data, len);
if (retval == -1)
{
copyError();
@@ -363,10 +363,10 @@ Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len)
return retval;
}
-Q_LONG KClientSocketBase::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KClientSocketBase::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
- Q_LONG retval = socketDevice()->writeBlock(data, len, to);
+ TQ_LONG retval = socketDevice()->writeBlock(data, len, to);
if (retval == -1)
{
copyError();
diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h
index d4e31b6b3..4883e6a5b 100644
--- a/kdecore/network/kclientsocketbase.h
+++ b/kdecore/network/kclientsocketbase.h
@@ -257,7 +257,7 @@ public:
* This is a convenience function provided to ease migrating from
* Qt 3.x's TQSocket class.
*/
- inline void connectToHost(const TQString& host, Q_UINT16 port)
+ inline void connectToHost(const TQString& host, TQ_UINT16 port)
{ connect(host, TQString::number(port)); }
/**
@@ -293,7 +293,7 @@ public:
* Reimplemented from KSocketBase.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -302,40 +302,40 @@ public:
/**
* Waits for more data. Reimplemented from KSocketBase.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from a socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
* Reads data from a socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data from the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* @overload
* Peeks data from the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress &from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from);
/**
* Writes data to the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* @overload
* Writes data to the socket. Reimplemented from KSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Returns the local socket address. Reimplemented from KSocketBase.
@@ -413,8 +413,8 @@ signals:
void stateChanged(int newstate);
/**
- * This signal is emitted when this object finds an error.
- * The @p code parameter contains the error code that can
+ * This signal is emitted when this object tqfinds an error.
+ * The @p code parameter tqcontains the error code that can
* also be found by calling @ref error.
*/
void gotError(int code);
diff --git a/kdecore/network/kdatagramsocket.cpp b/kdecore/network/kdatagramsocket.cpp
index d598d2d14..ff6ea04b3 100644
--- a/kdecore/network/kdatagramsocket.cpp
+++ b/kdecore/network/kdatagramsocket.cpp
@@ -133,7 +133,7 @@ bool KDatagramSocket::connect(const TQString& node, const TQString& service)
KDatagramPacket KDatagramSocket::receive()
{
- Q_LONG size = bytesAvailable();
+ TQ_LONG size = bytesAvailable();
if (size == 0)
{
// nothing available yet to read
@@ -165,12 +165,12 @@ KDatagramPacket KDatagramSocket::receive()
return KDatagramPacket(data, address);
}
-Q_LONG KDatagramSocket::send(const KDatagramPacket& packet)
+TQ_LONG KDatagramSocket::send(const KDatagramPacket& packet)
{
return writeBlock(packet.data(), packet.size(), packet.address());
}
-Q_LONG KDatagramSocket::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KDatagramSocket::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
if (to.family() != AF_UNSPEC)
{
diff --git a/kdecore/network/kdatagramsocket.h b/kdecore/network/kdatagramsocket.h
index 6b94c1d42..a58b7c4fd 100644
--- a/kdecore/network/kdatagramsocket.h
+++ b/kdecore/network/kdatagramsocket.h
@@ -222,7 +222,7 @@ public:
*
* Connecting means only to designate the given address as the default
* destination address for datagrams sent without destination addresses
- * ( writeBlock(const char *, Q_ULONG) ).
+ * ( writeBlock(const char *, TQ_ULONG) ).
*
* @note Calling connect will not cause the socket to be bound. You have
* to call @ref bind explicitly.
@@ -240,7 +240,7 @@ public:
/**
* Writes data to the socket. Reimplemented from KClientSocketBase.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Receives one datagram from the stream. The reading process is guaranteed
@@ -260,7 +260,7 @@ public:
*
* @returns the number of bytes written or -1 in case of error.
*/
- virtual Q_LONG send(const KDatagramPacket& packet);
+ virtual TQ_LONG send(const KDatagramPacket& packet);
private slots:
void lookupFinishedLocal();
diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp
index 09d8dd7a5..55b69a2b3 100644
--- a/kdecore/network/khttpproxysocketdevice.cpp
+++ b/kdecore/network/khttpproxysocketdevice.cpp
@@ -153,12 +153,12 @@ bool KHttpProxySocketDevice::connect(const TQString& node, const TQString& servi
setState(0); // unset open flag
// prepare the request
- TQString request = TQString::fromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
+ TQString request = TQString::tqfromLatin1("CONNECT %1:%2 HTTP/1.1\r\n"
"Cache-Control: no-cache\r\n"
"Host: \r\n"
"\r\n");
TQString node2 = node;
- if (node.contains(':'))
+ if (node.tqcontains(':'))
node2 = '[' + node + ']';
d->request = request.arg(node2).arg(service).latin1();
@@ -179,7 +179,7 @@ bool KHttpProxySocketDevice::parseServerReply()
if (!d->request.isEmpty())
{
// send request
- Q_LONG written = writeBlock(d->request, d->request.length());
+ TQ_LONG written = writeBlock(d->request, d->request.length());
if (written < 0)
{
qDebug("KHttpProxySocketDevice: would block writing request!");
@@ -205,7 +205,7 @@ bool KHttpProxySocketDevice::parseServerReply()
int index;
if (!blocking())
{
- Q_LONG avail = bytesAvailable();
+ TQ_LONG avail = bytesAvailable();
qDebug("KHttpProxySocketDevice: %ld bytes available", avail);
setState(0);
if (avail == 0)
@@ -222,7 +222,7 @@ bool KHttpProxySocketDevice::parseServerReply()
TQCString fullHeaders = d->reply + buf.data();
// search for the end of the headers
- index = fullHeaders.find("\r\n\r\n");
+ index = fullHeaders.tqfind("\r\n\r\n");
if (index == -1)
{
// no, headers not yet finished...
@@ -265,9 +265,9 @@ bool KHttpProxySocketDevice::parseServerReply()
// now really parse the reply
qDebug("KHttpProxySocketDevice: get reply: %s\n",
- d->reply.left(d->reply.find('\r')).data());
+ d->reply.left(d->reply.tqfind('\r')).data());
if (d->reply.left(7) != "HTTP/1." ||
- (index = d->reply.find(' ')) == -1 ||
+ (index = d->reply.tqfind(' ')) == -1 ||
d->reply[index + 1] != '2')
{
setError(IO_ConnectError, NetFailure);
diff --git a/kdecore/network/kiobuffer.h b/kdecore/network/kiobuffer.h
index 839899b18..02f75a420 100644
--- a/kdecore/network/kiobuffer.h
+++ b/kdecore/network/kiobuffer.h
@@ -85,7 +85,7 @@ public:
*
* @sa size
*/
- virtual Q_LONG length() const = 0;
+ virtual TQ_LONG length() const = 0;
/**
* Returns true if the buffer is empty of data.
@@ -99,7 +99,7 @@ public:
*
* @sa length for the length of the data stored
*/
- virtual Q_LONG size() const = 0;
+ virtual TQ_LONG size() const = 0;
/**
* Returns true if the buffer is full (i.e., cannot receive more data)
@@ -114,7 +114,7 @@ public:
* @returns true on success, false if an error occurred.
* @note if the new size is less than length(), the buffer will be truncated
*/
- virtual bool setSize(Q_LONG size) = 0;
+ virtual bool setSize(TQ_LONG size) = 0;
/**
* Adds data to the end of the buffer.
@@ -123,7 +123,7 @@ public:
* @param len the data length, in bytes
* @returns the number of bytes added to the end of the buffer.
*/
- virtual Q_LONG feedBuffer(const char *data, Q_LONG len) = 0;
+ virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len) = 0;
/**
* Consumes data from the beginning of the buffer.
@@ -133,7 +133,7 @@ public:
* @param discard if true, the bytes copied will be discarded
* @returns the number of bytes copied from the buffer
*/
- virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true) = 0;
+ virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true) = 0;
/**
* Clears the buffer.
diff --git a/kdecore/network/knetworkinterface.h b/kdecore/network/knetworkinterface.h
index 74fd52d55..c9dd1b145 100644
--- a/kdecore/network/knetworkinterface.h
+++ b/kdecore/network/knetworkinterface.h
@@ -30,7 +30,7 @@ namespace KNetwork {
/**
* A place-holder class for a future network interface class.
- * This class is to be replaced with a more powerful version, inspired
+ * This class is to be tqreplaced with a more powerful version, inspired
* by:
* - KInetInterface (kdenetwork/krfb/srvloc)
* - NWInterface (kdenonbeta/knot/lib)
diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp
index cfb87e3ef..013d1e335 100644
--- a/kdecore/network/kresolver.cpp
+++ b/kdecore/network/kresolver.cpp
@@ -105,7 +105,7 @@ KResolverEntry::KResolverEntry(const KSocketAddress& addr, int socktype, int pro
}
// constructor with even more stuff
-KResolverEntry::KResolverEntry(const struct sockaddr* sa, Q_UINT16 salen, int socktype,
+KResolverEntry::KResolverEntry(const struct sockaddr* sa, TQ_UINT16 salen, int socktype,
int protocol, const TQString& canonName,
const TQCString& encodedName) :
d(new KResolverEntryPrivate)
@@ -141,7 +141,7 @@ KSocketAddress KResolverEntry::address() const
}
// returns the length
-Q_UINT16 KResolverEntry::length() const
+TQ_UINT16 KResolverEntry::length() const
{
return d ? d->addr.length() : 0;
}
@@ -393,7 +393,7 @@ int KResolver::setFlags(int flags)
return oldflags;
}
-// sets the family mask
+// sets the family tqmask
void KResolver::setFamily(int families)
{
if (!isRunning())
@@ -546,7 +546,7 @@ void KResolver::emitFinished()
emit finished(d->results);
if (p && d->deleteWhenDone)
- deleteLater(); // in QObject
+ deleteLater(); // in TQObject
}
TQString KResolver::errorString(int errorcode, int syserror)
@@ -587,7 +587,7 @@ KResolverResults
KResolver::resolve(const TQString& host, const TQString& service, int flags,
int families)
{
- KResolver qres(host, service, qApp, "synchronous KResolver");
+ KResolver qres(host, service, TQT_TQOBJECT(tqApp), "synchronous KResolver");
qres.setFlags(flags);
qres.setFamily(families);
qres.start();
@@ -599,7 +599,7 @@ bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot,
const TQString& host, const TQString& service,
int flags, int families)
{
- KResolver* qres = new KResolver(host, service, qApp, "asynchronous KResolver");
+ KResolver* qres = new KResolver(host, service, TQT_TQOBJECT(tqApp), "asynchronous KResolver");
TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot);
qres->setFlags(flags);
qres->setFamily(families);
@@ -915,16 +915,16 @@ TQString KResolver::localHostName()
}
if (name.isEmpty())
- return TQString::fromLatin1("localhost");
+ return TQString::tqfromLatin1("localhost");
- if (name.find('.') == -1)
+ if (name.tqfind('.') == -1)
{
// not fully qualified
// must resolve
KResolverResults results = resolve(name, "0", CanonName);
if (results.isEmpty())
- // cannot find a valid hostname!
- return TQString::fromLatin1("localhost");
+ // cannot tqfind a valid hostname!
+ return TQString::tqfromLatin1("localhost");
else
return results.first().canonicalName();
}
@@ -934,7 +934,7 @@ TQString KResolver::localHostName()
// forward declaration
-static TQStringList splitLabels(const TQString& unicodeDomain);
+static TQStringList splitLabels(const TQString& tqunicodeDomain);
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::fromLatin1(kde_use_idn).lower()));
+ return new TQStringList(TQStringList::split(':', TQString::tqfromLatin1(kde_use_idn).lower()));
}
// implement the ToAscii function, as described by IDN documents
-TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
+TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain)
{
if (!idnDomains)
idnDomains = KResolver_initIdnDomains();
@@ -958,10 +958,10 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
// 2) split the domain into individual labels, without
// separators.
- TQStringList input = splitLabels(unicodeDomain);
+ TQStringList input = splitLabels(tqunicodeDomain);
// Do we allow IDN names for this TLD?
- if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
+ if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower()))
return input.join(".").lower().latin1(); // No IDN allowed for this TLD
// 3) decide whether to enforce the STD3 rules for chars < 0x7F
@@ -987,7 +987,7 @@ TQCString KResolver::domainToAscii(const TQString& unicodeDomain)
TQString KResolver::domainToUnicode(const TQCString& asciiDomain)
{
- return domainToUnicode(TQString::fromLatin1(asciiDomain));
+ return domainToUnicode(TQString::tqfromLatin1(asciiDomain));
}
// implement the ToUnicode function, as described by IDN documents
@@ -1009,7 +1009,7 @@ TQString KResolver::domainToUnicode(const TQString& asciiDomain)
TQStringList input = splitLabels(asciiDomain);
// Do we allow IDN names for this TLD?
- if (input.count() && !idnDomains->contains(input[input.count()-1].lower()))
+ if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower()))
return asciiDomain.lower(); // No TLDs allowed
// 3) decide whether to enforce the STD3 rules for chars < 0x7F
@@ -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& unicodeDomain)
+static TQStringList splitLabels(const TQString& tqunicodeDomain)
{
// 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& unicodeDomain)
TQStringList lst;
int start = 0;
uint i;
- for (i = 0; i < unicodeDomain.length(); i++)
+ for (i = 0; i < tqunicodeDomain.length(); i++)
{
- unsigned int c = unicodeDomain[i].unicode();
+ unsigned int c = tqunicodeDomain[i].tqunicode();
if (c == separators[0] ||
c == separators[1] ||
@@ -1070,13 +1070,13 @@ static TQStringList splitLabels(const TQString& unicodeDomain)
c == separators[3])
{
// found a separator!
- lst << unicodeDomain.mid(start, i - start);
+ lst << tqunicodeDomain.mid(start, i - start);
start = i + 1;
}
}
if ((long)i >= start)
// there is still one left
- lst << unicodeDomain.mid(start, i - start);
+ lst << tqunicodeDomain.mid(start, i - start);
return lst;
}
@@ -1097,11 +1097,11 @@ static TQCString ToASCII(const TQString& label)
TQCString retval;
char buf[65];
- Q_UINT32* ucs4 = new Q_UINT32[label.length() + 1];
+ TQ_UINT32* ucs4 = new TQ_UINT32[label.length() + 1];
uint i;
for (i = 0; i < label.length(); i++)
- ucs4[i] = (unsigned long)label[i].unicode();
+ ucs4[i] = (unsigned long)label[i].tqunicode();
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,18 +1118,18 @@ 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_unicode
+ // We have idna.h, so we can use the idna_to_tqunicode
// function :)
- Q_UINT32 *ucs4_input, *ucs4_output;
+ TQ_UINT32 *ucs4_input, *ucs4_output;
size_t outlen;
- ucs4_input = new Q_UINT32[label.length() + 1];
+ ucs4_input = new TQ_UINT32[label.length() + 1];
for (uint i = 0; i < label.length(); i++)
- ucs4_input[i] = (unsigned long)label[i].unicode();
+ ucs4_input[i] = (unsigned long)label[i].tqunicode();
// try the same length for output
- ucs4_output = new Q_UINT32[outlen = label.length()];
+ ucs4_output = new TQ_UINT32[outlen = label.length()];
idna_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
@@ -1139,7 +1139,7 @@ static TQString ToUnicode(const TQString& label)
{
// it must have failed
delete [] ucs4_output;
- ucs4_output = new Q_UINT32[outlen];
+ ucs4_output = new TQ_UINT32[outlen];
idna_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
diff --git a/kdecore/network/kresolver.h b/kdecore/network/kresolver.h
index 5b66f362c..f17ac840f 100644
--- a/kdecore/network/kresolver.h
+++ b/kdecore/network/kresolver.h
@@ -51,11 +51,11 @@ class KResolverEntryPrivate;
* @brief One resolution entry.
*
* This class is one element in the resolution results list.
- * It contains the socket address for connecting, as well as
+ * It tqcontains the socket address for connecting, as well as
* a bit more of information: the socket type, address family
* and protocol numbers.
*
- * This class contains all the information required for creating,
+ * This class tqcontains all the information required for creating,
* binding and connecting a socket.
*
* KResolverEntry objects implicitly share data, so copying them
@@ -101,7 +101,7 @@ public:
* @param canonName the canonical name of the resolved hostname
* @param encodedName the ASCII-compatible encoding of the hostname
*/
- KResolverEntry(const struct sockaddr *sa, Q_UINT16 salen, int socktype,
+ KResolverEntry(const struct sockaddr *sa, TQ_UINT16 salen, int socktype,
int protocol, const TQString& canonName = TQString::null,
const TQCString& encodedName = TQCString());
@@ -128,7 +128,7 @@ public:
/**
* Retrieves the length of the socket address structure.
*/
- Q_UINT16 length() const;
+ TQ_UINT16 length() const;
/**
* Retrieves the family associated with this socket address.
@@ -180,7 +180,7 @@ class KResolverResultsPrivate;
* @class KResolverResults kresolver.h kresolver.h
* @brief Name and service resolution results.
*
- * This object contains the results of a name and service resolution, as
+ * This object tqcontains the results of a name and service resolution, as
* those performed by @ref KResolver. It is also a descendant of TQValueList, so
* you may use all its member functions here to access the elements.
*
@@ -292,7 +292,7 @@ class KResolverPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KResolver: public QObject
+class KDECORE_EXPORT KResolver: public TQObject
{
Q_OBJECT
@@ -398,7 +398,7 @@ public:
};
/**
- * Status codes.
+ * tqStatus codes.
*
* These are the possible status for a Resolver object. A value
* greater than zero indicates normal behaviour, while negative
@@ -417,7 +417,7 @@ public:
* Note 2: the status Queued and InProgress might not be distinguishable.
* Some implementations might not differentiate one from the other.
*/
- enum StatusCodes
+ enum tqStatusCodes
{
Idle = 0,
Queued = 1,
@@ -462,7 +462,7 @@ public:
/**
* Retrieve the current status of this object.
*
- * @see StatusCodes for the possible status codes.
+ * @see tqStatusCodes for the possible status codes.
*/
int status() const;
@@ -470,8 +470,8 @@ public:
* Retrieve the error code in this object.
*
* This function will return NoError if we are not in
- * an error condition. See @ref status and @ref StatusCodes to
- * find out what the current status is.
+ * an error condition. See @ref status and @ref tqStatusCodes to
+ * tqfind out what the current status is.
*
* @see errorString for getting a textual representation of
* this error
@@ -668,7 +668,7 @@ public:
* an empty object.
*
* @return the resolved data
- * @see status for information on finding out if the resolution was successful
+ * @see status for information on tqfinding out if the resolution was successful
*/
KResolverResults results() const;
@@ -795,11 +795,11 @@ public:
* Note that the encoding is illegible and, thus, should not be presented
* to the user, except if requested.
*
- * @param unicodeDomain the domain name to be encoded
+ * @param tqunicodeDomain 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& unicodeDomain);
+ static TQCString domainToAscii(const TQString& tqunicodeDomain);
/**
* Does the inverse of @ref domainToAscii and return an Unicode domain
diff --git a/kdecore/network/kresolver_p.h b/kdecore/network/kresolver_p.h
index e29304383..b4ab61108 100644
--- a/kdecore/network/kresolver_p.h
+++ b/kdecore/network/kresolver_p.h
@@ -283,14 +283,14 @@ namespace KNetwork
private:
/*
- * finds a suitable worker for this request
+ * tqfinds a suitable worker for this request
*/
- KNetwork::KResolverWorkerBase *findWorker(KNetwork::KResolverPrivate *p);
+ KNetwork::KResolverWorkerBase *tqfindWorker(KNetwork::KResolverPrivate *p);
/*
- * finds data for this request
+ * tqfinds data for this request
*/
- RequestData* findData(KResolverThread*);
+ RequestData* tqfindData(KResolverThread*);
/*
* Handle completed requests.
diff --git a/kdecore/network/kresolvermanager.cpp b/kdecore/network/kresolvermanager.cpp
index b3c7172ae..b97f58005 100644
--- a/kdecore/network/kresolvermanager.cpp
+++ b/kdecore/network/kresolvermanager.cpp
@@ -85,11 +85,11 @@ using namespace KNetwork::Internal;
process, which means it will lock and unlock the manager mutex in
the process.
- If it finds no new data, it'll wait on the feedWorkers condition
+ If it tqfinds no new data, it'll wait on the feedWorkers condition
for a certain maximum time. If that time expires and there's still
no data, the thread will exit, in order to save system resources.
- If it finds data, however, it'll set up and call the worker class
+ If it tqfinds data, however, it'll set up and call the worker class
that has been selected by the manager. Once that worker is done,
the thread releases the data through KResolverManager::releaseData.
@@ -99,7 +99,7 @@ using namespace KNetwork::Internal;
When data is being requested, the KResolverManager::requestData
function will look the currentRequests list and return the first
- Queued request it finds, while marking it to be InProgress.
+ Queued request it tqfinds, while marking it to be InProgress.
When the worker class has returned, the worker thread will release
that data through the KResolverManager::releaseData function. If the
@@ -367,7 +367,7 @@ RequestData* KResolverManager::requestData(KResolverThread *th, int maxWaitTime)
// lock the mutex, so that the manager thread or other threads won't
// interfere.
TQMutexLocker locker(&mutex);
- RequestData *data = findData(th);
+ RequestData *data = tqfindData(th);
if (data)
// it found something, that's good
@@ -378,18 +378,18 @@ RequestData* KResolverManager::requestData(KResolverThread *th, int maxWaitTime)
feedWorkers.wait(&mutex, maxWaitTime);
availableThreads--;
- data = findData(th);
+ data = tqfindData(th);
return data;
}
-RequestData* KResolverManager::findData(KResolverThread* th)
+RequestData* KResolverManager::tqfindData(KResolverThread* th)
{
/////
// This function is called by @ref requestData above and must
// always be called with a locked mutex
/////
- // now find data to be processed
+ // now tqfind data to be processed
for (RequestData *curr = newRequests.first(); curr; curr = newRequests.next())
if (!curr->worker->m_finished)
{
@@ -504,7 +504,7 @@ void KResolverManager::registerNewWorker(KResolverWorkerFactoryBase *factory)
workerFactories.append(factory);
}
-KResolverWorkerBase* KResolverManager::findWorker(KResolverPrivate* p)
+KResolverWorkerBase* KResolverManager::tqfindWorker(KResolverPrivate* p)
{
/////
// this function can be called on any user thread
@@ -514,7 +514,7 @@ KResolverWorkerBase* KResolverManager::findWorker(KResolverPrivate* p)
// thread-safe!
// but the factory list is expected not to be changed asynchronously
- // This function is responsible for finding a suitable worker for the given
+ // This function is responsible for tqfinding a suitable worker for the given
// input. That means we have to do a costly operation to create each worker
// class and call their preprocessing functions. The first one that
// says they can process (i.e., preprocess() returns true) will get the job.
@@ -653,12 +653,12 @@ void KResolverManager::enqueue(KResolver *obj, RequestData *requestor)
newrequest->input = &obj->d->input;
newrequest->requestor = requestor;
- // when processing a new request, find the most
+ // when processing a new request, tqfind the most
// suitable worker
- if ((newrequest->worker = findWorker(obj->d)) == 0L)
+ if ((newrequest->worker = tqfindWorker(obj->d)) == 0L)
{
// oops, problem
- // cannot find a worker class for this guy
+ // cannot tqfind a worker class for this guy
obj->d->status = KResolver::Failed;
obj->d->errorcode = KResolver::UnsupportedFamily;
obj->d->syserror = 0;
@@ -668,7 +668,7 @@ void KResolverManager::enqueue(KResolver *obj, RequestData *requestor)
}
// no, queue it
- // p->status was set in findWorker!
+ // p->status was set in tqfindWorker!
if (requestor)
requestor->nRequests++;
@@ -728,7 +728,7 @@ void KResolverManager::dispatch(RequestData *data)
{
// yes, a new thread should be started
- // find if there's a finished one
+ // tqfind if there's a finished one
KResolverThread *th = workers.first();
while (th && th->running())
th = workers.next();
diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp
index f64803ced..401158cab 100644
--- a/kdecore/network/kresolverstandardworkers.cpp
+++ b/kdecore/network/kresolverstandardworkers.cpp
@@ -140,11 +140,11 @@ bool KBlacklistWorker::isBlacklisted(const TQString& host)
return false;
// KDE4: QLatin1String
- TQString ascii = TQString::fromLatin1(KResolver::domainToAscii(host));
+ TQString ascii = TQString::tqfromLatin1(KResolver::domainToAscii(host));
TQMutexLocker locker(&blacklistMutex);
- // now find out if this hostname is present
+ // now tqfind out if this hostname is present
TQStringList::ConstIterator it = blacklist.constBegin(),
end = blacklist.constEnd();
for ( ; it != end; ++it)
@@ -208,12 +208,12 @@ namespace
{
public:
TQCString m_hostname; // might be different!
- Q_UINT16 m_port;
+ TQ_UINT16 m_port;
int m_scopeid;
int m_af;
KResolverResults& results;
- GetHostByNameThread(const char * hostname, Q_UINT16 port,
+ GetHostByNameThread(const char * hostname, TQ_UINT16 port,
int scopeid, int af, KResolverResults* res) :
m_hostname(hostname), m_port(port), m_scopeid(scopeid), m_af(af),
results(*res)
@@ -251,7 +251,7 @@ namespace
// check blacklist
if (m_af != AF_INET &&
- KBlacklistWorker::isBlacklisted(TQString::fromLatin1(m_hostname)))
+ KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_hostname)))
break;
# ifdef USE_GETHOSTBYNAME2_R
@@ -358,7 +358,7 @@ namespace
if (socktype == 0)
socktype = SOCK_STREAM; // default
- TQString canon = KResolver::domainToUnicode(TQString::fromLatin1(he->h_name));
+ TQString canon = KResolver::domainToUnicode(TQString::tqfromLatin1(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::fromLatin1(m_node)))
+ KBlacklistWorker::isBlacklisted(TQString::tqfromLatin1(m_node)))
{
results.setError(KResolver::NoName);
finished();
@@ -547,11 +547,11 @@ bool KStandardWorker::sanityCheck()
if (!nodeName().isEmpty())
{
TQString node = nodeName();
- if (node.find('%') != -1)
- node.truncate(node.find('%'));
+ if (node.tqfind('%') != -1)
+ node.truncate(node.tqfind('%'));
- if (node.isEmpty() || node == TQString::fromLatin1("*") ||
- node == TQString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
+ node == TQString::tqfromLatin1("localhost"))
m_encodedName.truncate(0);
else
{
@@ -584,7 +584,7 @@ bool KStandardWorker::resolveScopeId()
{
// we must test the original name, not the encoded one
scopeid = 0;
- int pos = nodeName().findRev('%');
+ int pos = nodeName().tqfindRev('%');
if (pos == -1)
return true;
@@ -608,7 +608,7 @@ bool KStandardWorker::resolveScopeId()
bool KStandardWorker::resolveService()
{
- // find the service first
+ // tqfind the service first
bool ok;
port = serviceName().toUInt(&ok);
if (!ok)
@@ -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::fromLatin1("*")) == 0)
+ if (serviceName().isEmpty() || serviceName().compare(TQString::tqfromLatin1("*")) == 0)
port = 0;
else
{
@@ -648,7 +648,7 @@ bool KStandardWorker::resolveService()
}
// it worked, we have a port number
- port = (Q_UINT16)result;
+ port = (TQ_UINT16)result;
}
}
@@ -704,7 +704,7 @@ bool KStandardWorker::resolveNumerically()
// no Internet address is wanted!
return (flags() & KResolver::NoResolve);
- // now try to find results
+ // now try to tqfind results
if (!resolveScopeId() || !resolveService())
return (flags() & KResolver::NoResolve);
@@ -712,7 +712,7 @@ bool KStandardWorker::resolveNumerically()
// now try to resolve the hostname numerically
KInetSocketAddress sa;
setError(KResolver::NoError);
- sa.setHost(KIpAddress(TQString::fromLatin1(m_encodedName)));
+ sa.setHost(KIpAddress(TQString::tqfromLatin1(m_encodedName)));
// if it failed, the length was reset to 0
bool ok = sa.length() != 0;
@@ -827,16 +827,16 @@ bool KStandardWorker::preprocess()
// check if the user wants something we know about
#ifdef AF_INET6
-# define mask (KResolver::IPv6Family | KResolver::IPv4Family | KResolver::UnixFamily)
+# define tqmask (KResolver::IPv6Family | KResolver::IPv4Family | KResolver::UnixFamily)
#else
-# define mask (KResolver::IPv4Family | KResolver::UnixFamily)
+# define tqmask (KResolver::IPv4Family | KResolver::UnixFamily)
#endif
- if ((familyMask() & mask) == 0)
+ if ((familyMask() & tqmask) == 0)
// errr... nothing we know about
return false;
-#undef mask
+#undef tqmask
return true; // it's ok
}
@@ -862,7 +862,7 @@ bool KStandardWorker::run()
// these are the family types that we know of
struct
{
- KResolver::SocketFamilies mask;
+ KResolver::SocketFamilies tqmask;
int af;
} families[] = { { KResolver::IPv4Family, AF_INET }
#ifdef AF_INET6
@@ -874,7 +874,7 @@ bool KStandardWorker::run()
resultList.setAutoDelete(true);
for (int i = 0; i < familyCount; i++)
- if (familyMask() & families[i].mask)
+ if (familyMask() & families[i].tqmask)
{
#ifdef AF_INET6
if (skipIPv6 && families[i].af == AF_INET6)
diff --git a/kdecore/network/kresolverstandardworkers_p.h b/kdecore/network/kresolverstandardworkers_p.h
index 310849bf3..2db460bef 100644
--- a/kdecore/network/kresolverstandardworkers_p.h
+++ b/kdecore/network/kresolverstandardworkers_p.h
@@ -66,7 +66,7 @@ namespace KNetwork { namespace Internal
{
protected:
mutable TQCString m_encodedName;
- Q_UINT16 port;
+ TQ_UINT16 port;
int scopeid;
TQPtrList<KNetwork::KResolverResults> resultList;
diff --git a/kdecore/network/kresolverworkerbase.h b/kdecore/network/kresolverworkerbase.h
index 4dee33239..a4f352da6 100644
--- a/kdecore/network/kresolverworkerbase.h
+++ b/kdecore/network/kresolverworkerbase.h
@@ -119,7 +119,7 @@ public:
* Derived classes will put their resolved data in this list, or will
* leave it empty in case of error.
*
- * Status and error codes should also be stored in this object (the
+ * tqStatus and error codes should also be stored in this object (the
* @ref setError function does that).
*/
KResolverResults results;
@@ -147,7 +147,7 @@ public:
int flags() const;
/**
- * gets the family mask
+ * gets the family tqmask
*/
int familyMask() const;
diff --git a/kdecore/network/kreverseresolver.cpp b/kdecore/network/kreverseresolver.cpp
index 639f6dbe4..d781e5f18 100644
--- a/kdecore/network/kreverseresolver.cpp
+++ b/kdecore/network/kreverseresolver.cpp
@@ -203,7 +203,7 @@ bool KReverseResolver::resolve(const KSocketAddress& addr, TQString& node,
return false;
}
-bool KReverseResolver::resolve(const struct sockaddr* sa, Q_UINT16 salen,
+bool KReverseResolver::resolve(const struct sockaddr* sa, TQ_UINT16 salen,
TQString& node, TQString& serv, int flags)
{
return resolve(KSocketAddress(sa, salen), node, serv, flags);
@@ -238,8 +238,8 @@ bool ReverseThread::run()
if (err == 0)
{
- node = KResolver::domainToUnicode(TQString::fromLatin1(h));
- service = TQString::fromLatin1(s);
+ node = KResolver::domainToUnicode(TQString::tqfromLatin1(h));
+ service = TQString::tqfromLatin1(s);
success = true;
}
else
diff --git a/kdecore/network/kreverseresolver.h b/kdecore/network/kreverseresolver.h
index 26274e586..bf338c075 100644
--- a/kdecore/network/kreverseresolver.h
+++ b/kdecore/network/kreverseresolver.h
@@ -47,7 +47,7 @@ class KReverseResolverPrivate;
*
* @author Thiago Macieira <thiago.macieira@kdemail.net>
*/
-class KDECORE_EXPORT KReverseResolver: public QObject
+class KDECORE_EXPORT KReverseResolver: public TQObject
{
Q_OBJECT
@@ -144,7 +144,7 @@ signals:
/**
* This signal is emitted when the resolution has finished.
*
- * @param obj this class, which contains the results
+ * @param obj this class, which tqcontains the results
*/
void finished(const KReverseResolver& obj);
@@ -183,7 +183,7 @@ public:
* @return true if the resolution succeeded, false if not
* @see ReverseFlags for the possible values for @p flags
*/
- static bool resolve(const struct sockaddr* sa, Q_UINT16 salen,
+ static bool resolve(const struct sockaddr* sa, TQ_UINT16 salen,
TQString& node, TQString& serv, int flags = 0);
private:
diff --git a/kdecore/network/kserversocket.cpp b/kdecore/network/kserversocket.cpp
index 49facb12c..084418cf1 100644
--- a/kdecore/network/kserversocket.cpp
+++ b/kdecore/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::fromLatin1(""));
+ d->resolver.setServiceName(TQString::tqfromLatin1(""));
// don't restart the lookups if they had succeeded and
// the input values weren't changed
@@ -326,7 +326,7 @@ KActiveSocketBase* KServerSocket::accept()
streamsocket->setSocketDevice(accepted);
// FIXME!
- // when KStreamSocket can find out the state of the socket passed through
+ // when KStreamSocket can tqfind out the state of the socket passed through
// setSocketDevice, this will probably be unnecessary:
streamsocket->setState(KStreamSocket::Connected);
streamsocket->setFlags(IO_Sequential | IO_Raw | IO_ReadWrite | IO_Open | IO_Async);
diff --git a/kdecore/network/kserversocket.h b/kdecore/network/kserversocket.h
index 30d8b40b0..d4c7fea96 100644
--- a/kdecore/network/kserversocket.h
+++ b/kdecore/network/kserversocket.h
@@ -380,8 +380,8 @@ private slots:
signals:
/**
- * This signal is emitted when this object finds an error.
- * The @p code parameter contains the error code that can
+ * This signal is emitted when this object tqfinds an error.
+ * The @p code parameter tqcontains the error code that can
* also be found by calling @ref error.
*/
void gotError(int code);
diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp
index adfc76b06..a6fd14cf5 100644
--- a/kdecore/network/ksocketaddress.cpp
+++ b/kdecore/network/ksocketaddress.cpp
@@ -74,7 +74,7 @@ const KIpAddress KIpAddress::anyhostV4(0L, 4);
const KIpAddress KIpAddress::anyhostV6(0L, 6);
// helper function to test if an IPv6 v4-mapped address is equal to its IPv4 counterpart
-static bool check_v4mapped(const Q_UINT32* v6addr, Q_UINT32 v4addr)
+static bool check_v4mapped(const TQ_UINT32* v6addr, TQ_UINT32 v4addr)
{
// check that the v6 is a v4-mapped address
if (!(v6addr[0] == 0 && v6addr[1] == 0 && v6addr[2] == htonl(0x0000ffff)))
@@ -131,12 +131,12 @@ bool KIpAddress::setAddress(const TQString& address)
m_version = 0;
// try to guess the address version
- if (address.find(':') != -1)
+ if (address.tqfind(':') != -1)
{
#ifdef AF_INET6
// guessing IPv6
- Q_UINT32 buf[4];
+ TQ_UINT32 buf[4];
if (inet_pton(AF_INET6, address.latin1(), buf))
{
memcpy(m_data, buf, sizeof(m_data));
@@ -149,7 +149,7 @@ bool KIpAddress::setAddress(const TQString& address)
}
else
{
- Q_UINT32 buf;
+ TQ_UINT32 buf;
if (inet_pton(AF_INET, address.latin1(), &buf))
{
*m_data = buf;
@@ -165,7 +165,7 @@ bool KIpAddress::setAddress(const TQString& address)
bool KIpAddress::setAddress(const char* address)
{
- return setAddress(TQString::fromLatin1(address));
+ return setAddress(TQString::tqfromLatin1(address));
}
// set from binary data
@@ -194,21 +194,21 @@ TQString KIpAddress::toString() const
{
case 4:
inet_ntop(AF_INET, m_data, buf, sizeof(buf) - 1);
- return TQString::fromLatin1(buf);
+ return TQString::tqfromLatin1(buf);
case 6:
#ifdef AF_INET6
inet_ntop(AF_INET6, m_data, buf, sizeof(buf) - 1);
#endif
- return TQString::fromLatin1(buf);
+ return TQString::tqfromLatin1(buf);
}
return TQString::null;
}
-Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
+TQ_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
{
- Q_UINT32 addr = IPv4Addr(convertMapped);
+ TQ_UINT32 addr = IPv4Addr(convertMapped);
return ntohl(addr);
}
@@ -219,23 +219,23 @@ Q_UINT32 KIpAddress::hostIPv4Addr(bool convertMapped) const
struct our_sockaddr_in6
{
# ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT8 sin6_len;
- Q_UINT8 sin6_family;
+ TQ_UINT8 sin6_len;
+ TQ_UINT8 sin6_family;
# else //!HAVE_STRUCT_SOCKADDR_SA_LEN
- Q_UINT16 sin6_family;
+ TQ_UINT16 sin6_family;
# endif
- Q_UINT16 sin6_port; /* RFC says in_port_t */
- Q_UINT32 sin6_flowinfo;
- Q_UINT8 sin6_addr[16]; // 24 bytes up to here
- Q_UINT32 sin6_scope_id; // 28 bytes total
+ TQ_UINT16 sin6_port; /* RFC says in_port_t */
+ TQ_UINT32 sin6_flowinfo;
+ TQ_UINT8 sin6_addr[16]; // 24 bytes up to here
+ TQ_UINT32 sin6_scope_id; // 28 bytes total
};
// useful definitions
-#define MIN_SOCKADDR_LEN sizeof(Q_UINT16)
+#define MIN_SOCKADDR_LEN sizeof(TQ_UINT16)
#define SOCKADDR_IN_LEN sizeof(sockaddr_in)
#define MIN_SOCKADDR_IN6_LEN ((unsigned long) &(((our_sockaddr_in6*)0)->sin6_scope_id))
#define SOCKADDR_IN6_LEN sizeof(our_sockaddr_in6)
-#define MIN_SOCKADDR_UN_LEN (sizeof(Q_UINT16) + sizeof(char))
+#define MIN_SOCKADDR_UN_LEN (sizeof(TQ_UINT16) + sizeof(char))
class KNetwork::KSocketAddressData
@@ -263,14 +263,14 @@ public:
struct our_sockaddr_in6 *in6;
struct sockaddr_un *un;
} addr;
- Q_UINT16 curlen, reallen;
+ TQ_UINT16 curlen, reallen;
KSocketAddressData()
: ref(this)
{
addr.generic = 0L;
curlen = 0;
- invalidate();
+ tqinvalidate();
}
~KSocketAddressData()
@@ -282,10 +282,10 @@ public:
inline bool invalid() const
{ return reallen == 0; }
- inline void invalidate()
+ inline void tqinvalidate()
{ reallen = 0; }
- void dup(const sockaddr* sa, Q_UINT16 len, bool clear = true);
+ void dup(const sockaddr* sa, TQ_UINT16 len, bool clear = true);
void makeipv4()
{
@@ -343,12 +343,12 @@ public:
};
// create duplicates of
-void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear)
+void KSocketAddressData::dup(const sockaddr* sa, TQ_UINT16 len, bool clear)
{
if (len < MIN_SOCKADDR_LEN)
{
// certainly invalid
- invalidate();
+ tqinvalidate();
return;
}
@@ -359,7 +359,7 @@ void KSocketAddressData::dup(const sockaddr* sa, Q_UINT16 len, bool clear)
(sa->sa_family == AF_UNIX && len < MIN_SOCKADDR_UN_LEN)))
{
// also invalid
- invalidate();
+ tqinvalidate();
return;
}
@@ -411,7 +411,7 @@ KSocketAddress::KSocketAddress()
}
// constructor from binary data
-KSocketAddress::KSocketAddress(const sockaddr *sa, Q_UINT16 len)
+KSocketAddress::KSocketAddress(const sockaddr *sa, TQ_UINT16 len)
: d(new KSocketAddressData)
{
setAddress(sa, len);
@@ -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->invalidate();
+ d->tqinvalidate();
return *this;
}
@@ -462,24 +462,24 @@ sockaddr* KSocketAddress::address()
return d->addr.generic;
}
-KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, Q_UINT16 len)
+KSocketAddress& KSocketAddress::setAddress(const sockaddr* sa, TQ_UINT16 len)
{
if (sa != 0L && len >= MIN_SOCKADDR_LEN)
d->dup(sa, len);
else
- d->invalidate();
+ d->tqinvalidate();
return *this;
}
-Q_UINT16 KSocketAddress::length() const
+TQ_UINT16 KSocketAddress::length() const
{
if (d->invalid())
return 0;
return d->reallen;
}
-KSocketAddress& KSocketAddress::setLength(Q_UINT16 len)
+KSocketAddress& KSocketAddress::setLength(TQ_UINT16 len)
{
d->dup((sockaddr*)0L, len, false);
@@ -619,7 +619,7 @@ TQString KSocketAddress::toString() const
fmt = "[%1]:%2";
#endif
else if (d->addr.generic->sa_family == AF_UNIX)
- return TQString::fromLatin1("unix:%1").arg(serviceName());
+ return TQString::tqfromLatin1("unix:%1").arg(serviceName());
else
return i18n("1: the unknown socket address family number",
"Unknown family %1").arg(d->addr.generic->sa_family);
@@ -687,7 +687,7 @@ KInetSocketAddress::KInetSocketAddress()
}
// binary data constructor
-KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len)
+KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len)
: KSocketAddress(sa, len)
{
if (!d->invalid())
@@ -695,7 +695,7 @@ KInetSocketAddress::KInetSocketAddress(const sockaddr* sa, Q_UINT16 len)
}
// create from IP and port
-KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, Q_UINT16 port)
+KInetSocketAddress::KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port)
{
setHost(host);
setPort(port);
@@ -788,14 +788,14 @@ KInetSocketAddress& KInetSocketAddress::setHost(const KIpAddress& ip)
default:
// empty
- d->invalidate();
+ d->tqinvalidate();
}
return *this;
}
// returns the port
-Q_UINT16 KInetSocketAddress::port() const
+TQ_UINT16 KInetSocketAddress::port() const
{
if (d->invalid())
return 0;
@@ -814,7 +814,7 @@ Q_UINT16 KInetSocketAddress::port() const
return 0;
}
-KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port)
+KInetSocketAddress& KInetSocketAddress::setPort(TQ_UINT16 port)
{
if (d->invalid())
makeIPv4();
@@ -832,7 +832,7 @@ KInetSocketAddress& KInetSocketAddress::setPort(Q_UINT16 port)
#endif
default:
- d->invalidate(); // setting the port on something else
+ d->tqinvalidate(); // setting the port on something else
}
return *this;
@@ -850,7 +850,7 @@ KInetSocketAddress& KInetSocketAddress::makeIPv6()
return *this;
}
-Q_UINT32 KInetSocketAddress::flowinfo() const
+TQ_UINT32 KInetSocketAddress::flowinfo() const
{
#ifndef AF_INET6
return 0;
@@ -862,7 +862,7 @@ Q_UINT32 KInetSocketAddress::flowinfo() const
#endif
}
-KInetSocketAddress& KInetSocketAddress::setFlowinfo(Q_UINT32 flowinfo)
+KInetSocketAddress& KInetSocketAddress::setFlowinfo(TQ_UINT32 flowinfo)
{
makeIPv6(); // must set here
d->addr.in6->sin6_flowinfo = flowinfo;
@@ -897,18 +897,18 @@ void KInetSocketAddress::update()
return;
#endif
else
- d->invalidate();
+ d->tqinvalidate();
}
KUnixSocketAddress::KUnixSocketAddress()
{
}
-KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len)
+KUnixSocketAddress::KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len)
: KSocketAddress(sa, len)
{
if (!d->invalid() && d->addr.un->sun_family != AF_UNIX)
- d->invalidate();
+ d->tqinvalidate();
}
KUnixSocketAddress::KUnixSocketAddress(const KUnixSocketAddress& other)
diff --git a/kdecore/network/ksocketaddress.h b/kdecore/network/ksocketaddress.h
index 6889527e3..2d44a0909 100644
--- a/kdecore/network/ksocketaddress.h
+++ b/kdecore/network/ksocketaddress.h
@@ -119,7 +119,7 @@ public:
*
* @param ip4addr the IPv4 address
*/
- inline KIpAddress(Q_UINT32 ip4addr)
+ inline KIpAddress(TQ_UINT32 ip4addr)
{ setAddress(&ip4addr, 4); }
/**
@@ -232,7 +232,7 @@ public:
* system's in_addr type.
*
*/
- inline Q_UINT32 IPv4Addr(bool convertMapped = true) const
+ inline TQ_UINT32 IPv4Addr(bool convertMapped = true) const
{
return (convertMapped && isV4Mapped()) ? m_data[3] : m_data[0];
}
@@ -245,7 +245,7 @@ public:
* valid. The address returned is in host byte order.
*
*/
- Q_UINT32 hostIPv4Addr(bool convertMapped = true) const;
+ TQ_UINT32 hostIPv4Addr(bool convertMapped = true) const;
public:
/*-- tests --*/
@@ -310,7 +310,7 @@ public:
inline bool isMulticast() const
{
if (version() == 4) return isClassD();
- if (version() == 6) return ((Q_UINT8*)addr())[0] == 0xff;
+ if (version() == 6) return ((TQ_UINT8*)addr())[0] == 0xff;
return false;
}
@@ -320,7 +320,7 @@ public:
inline bool isLinkLocal() const
{
if (version() != 6) return false;
- Q_UINT8* addr = (Q_UINT8*)this->addr();
+ TQ_UINT8* addr = (TQ_UINT8*)this->addr();
return (addr[0] & 0xff) == 0xfe &&
(addr[1] & 0xc0) == 0x80;
}
@@ -331,7 +331,7 @@ public:
inline bool isSiteLocal() const
{
if (version() != 6) return false;
- Q_UINT8* addr = (Q_UINT8*)this->addr();
+ TQ_UINT8* addr = (TQ_UINT8*)this->addr();
return (addr[0] & 0xff) == 0xfe &&
(addr[1] & 0xc0) == 0xc0;
}
@@ -348,10 +348,10 @@ public:
inline bool isV4Mapped() const
{
if (version() != 6) return false;
- Q_UINT32* addr = (Q_UINT32*)this->addr();
+ TQ_UINT32* addr = (TQ_UINT32*)this->addr();
return addr[0] == 0 && addr[1] == 0 &&
- ((Q_UINT16*)&addr[2])[0] == 0 &&
- ((Q_UINT16*)&addr[2])[1] == 0xffff;
+ ((TQ_UINT16*)&addr[2])[0] == 0 &&
+ ((TQ_UINT16*)&addr[2])[1] == 0xffff;
}
/**
@@ -360,7 +360,7 @@ public:
inline bool isV4Compat() const
{
if (version() != 6 || isLocalhost()) return false;
- Q_UINT32* addr = (Q_UINT32*)this->addr();
+ TQ_UINT32* addr = (TQ_UINT32*)this->addr();
return addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] != 0;
}
@@ -368,34 +368,34 @@ public:
* Returns true if this is an IPv6 node-local multicast address.
*/
inline bool isMulticastNodeLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x1; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x1; }
/**
* Returns true if this is an IPv6 link-local multicast address.
*/
inline bool isMulticastLinkLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x2; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x2; }
/**
* Returns true if this is an IPv6 site-local multicast address.
*/
inline bool isMulticastSiteLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x5; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x5; }
/**
* Returns true if this is an IPv6 organisational-local multicast address.
*/
inline bool isMulticastOrgLocal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0x8; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0x8; }
/**
* Returns true if this is an IPv6 global multicast address.
*/
inline bool isMulticastGlobal() const
- { return version() == 6 && isMulticast() && (((Q_UINT32*)addr())[0] & 0xf) == 0xe; }
+ { return version() == 6 && isMulticast() && (((TQ_UINT32*)addr())[0] & 0xf) == 0xe; }
protected:
- Q_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address
+ TQ_UINT32 m_data[4]; // 16 bytes, needed for an IPv6 address
char m_version;
@@ -437,7 +437,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Copy constructor. This creates a copy of the other
@@ -490,7 +490,7 @@ public:
* @param sa the socket address structure
* @param len the socket address length
*/
- KSocketAddress& setAddress(const sockaddr *sa, Q_UINT16 len);
+ KSocketAddress& setAddress(const sockaddr *sa, TQ_UINT16 len);
/**
* Returns the socket address structure, to be passed down to
@@ -502,7 +502,7 @@ public:
/**
* Returns the length of this socket address structure.
*/
- Q_UINT16 length() const;
+ TQ_UINT16 length() const;
/**
* Sets the length of this socket structure.
@@ -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 invalidate the socket if a known
+ * Also note that this function may tqinvalidate 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:
@@ -524,7 +524,7 @@ public:
*
* @param len the new length
*/
- KSocketAddress& setLength(Q_UINT16 len);
+ KSocketAddress& setLength(TQ_UINT16 len);
/**
* Returns the family of this address.
@@ -535,7 +535,7 @@ public:
/**
* Sets the family of this object.
*
- * Note: setting the family will probably invalidate any address data
+ * Note: setting the family will probably tqinvalidate any address data
* contained in this object. Use this function with care.
*
* @param family the new family to set
@@ -666,7 +666,7 @@ public:
* @param sa the sockaddr structure
* @param len the structure's length
*/
- KInetSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KInetSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Creates an object from an IP address and port.
@@ -674,7 +674,7 @@ public:
* @param host the IP address
* @param port the port number
*/
- KInetSocketAddress(const KIpAddress& host, Q_UINT16 port);
+ KInetSocketAddress(const KIpAddress& host, TQ_UINT16 port);
/**
* Copy constructor.
@@ -688,7 +688,7 @@ public:
/**
* Copy constructor.
*
- * If the other, generic socket address contains an Internet address,
+ * If the other, generic socket address tqcontains an Internet address,
* it will be copied. Otherwise, this object will be empty.
*
* @param other the other object
@@ -750,7 +750,7 @@ public:
* @return a port number in the range 0 to 65535, inclusive. An empty or
* invalid object will have a port number of 0.
*/
- Q_UINT16 port() const;
+ TQ_UINT16 port() const;
/**
* Sets the port number. If this object is empty, this function will default to
@@ -759,7 +759,7 @@ public:
* @param port the port number to set
* @return a reference to itself
*/
- KInetSocketAddress& setPort(Q_UINT16 port);
+ KInetSocketAddress& setPort(TQ_UINT16 port);
/**
* Converts this object to an IPv4 socket address. It has no effect if the object
@@ -787,7 +787,7 @@ public:
*
* @return the flowinfo information or 0 if this object is empty or IPv4
*/
- Q_UINT32 flowinfo() const;
+ TQ_UINT32 flowinfo() const;
/**
* Sets the flowinfo information for an IPv6 socket address. If this is not
@@ -796,7 +796,7 @@ public:
* @param flowinfo the flowinfo to set
* @return a reference to itself
*/
- KInetSocketAddress& setFlowinfo(Q_UINT32 flowinfo);
+ KInetSocketAddress& setFlowinfo(TQ_UINT32 flowinfo);
/**
* Returns the scope id this IPv6 socket is bound to.
@@ -854,7 +854,7 @@ public:
* @param sa the socket address structure
* @param len the structure's length
*/
- KUnixSocketAddress(const sockaddr* sa, Q_UINT16 len);
+ KUnixSocketAddress(const sockaddr* sa, TQ_UINT16 len);
/**
* Copy constructor. Creates a copy of the other object,
diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h
index 133086114..fe8812cde 100644
--- a/kdecore/network/ksocketbase.h
+++ b/kdecore/network/ksocketbase.h
@@ -128,7 +128,7 @@ public:
* Possible socket error codes.
*
* This is a list of possible error conditions that socket classes may
- * be expected to find.
+ * be expected to tqfind.
*
* - NoError: no error has been detected
* - LookupFailure: if a name lookup has failed
@@ -191,11 +191,11 @@ protected:
/**
* Set the given socket options.
*
- * The default implementation does nothing but store the mask internally.
+ * The default implementation does nothing but store the tqmask internally.
* Descended classes must override this function to achieve functionality and
* must also call this implementation.
*
- * @param opts a mask of @ref SocketOptions or-ed bits of options to set
+ * @param opts a tqmask of @ref SocketOptions or-ed bits of options to set
* or unset
* @returns true on success
* @note this function sets the options corresponding to the bits enabled in @p opts
@@ -206,11 +206,11 @@ protected:
/**
* Retrieves the socket options that have been set.
*
- * The default implementation just retrieves the mask from an internal variable.
+ * The default implementation just retrieves the tqmask from an internal variable.
* Descended classes may choose to override this function to read the values
* from the operating system.
*
- * @returns the mask of the options set
+ * @returns the tqmask of the options set
*/
virtual int socketOptions() const;
@@ -350,9 +350,9 @@ public:
* should test the object returned by @ref socketDevice (through
* @ref KSocketDevice::capabilities, for instance) the availability.
*
- * @param add mask of @ref KSocketDevice::Capabilities to add
- * @param remove mask of bits to remove from the requirements
- * @return the current mask of requested capabilities
+ * @param add tqmask of @ref KSocketDevice::Capabilities to add
+ * @param remove tqmask of bits to remove from the requirements
+ * @return the current tqmask of requested capabilities
*/
int setRequestedCapabilities(int add, int remove = 0);
@@ -533,7 +533,7 @@ public:
* blocking.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const = 0;
+ virtual TQ_LONG bytesAvailable() const = 0;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const = 0;
@@ -550,7 +550,7 @@ public:
*
* @returns the number of bytes available
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L) = 0;
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L) = 0;
/**
* Reads data from the socket.
@@ -558,7 +558,7 @@ public:
* Reimplemented from TQIODevice. See TQIODevice::readBlock for
* more information.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG len) = 0;
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG len) = 0;
/** @overload
* Receives data and the source address.
@@ -571,7 +571,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes read
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0;
/**
* Peeks the data in the socket.
@@ -584,7 +584,7 @@ public:
* @param maxlen the maximum number of bytes to peek
* @returns the actual number of bytes copied into @p data
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen) = 0;
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen) = 0;
/** @overload
* Peeks the data in the socket and the source address.
@@ -598,7 +598,7 @@ public:
* @param from the address of the sender will be stored here
* @returns the actual number of bytes copied into @p data
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from) = 0;
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from) = 0;
/**
* Writes the given data to the socket.
@@ -606,7 +606,7 @@ public:
* Reimplemented from TQIODevice. See TQIODevice::writeBlock for
* more information.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len) = 0;
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len) = 0;
/** @overload
* Writes the given data to the destination address.
@@ -619,7 +619,7 @@ public:
* @param to the address to send to
* @returns the number of bytes actually sent
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to) = 0;
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to) = 0;
/**
* Reads one character from the socket.
diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp
index 18c926c83..ca47bef9a 100644
--- a/kdecore/network/ksocketbuffer.cpp
+++ b/kdecore/network/ksocketbuffer.cpp
@@ -33,7 +33,7 @@
using namespace KNetwork;
using namespace KNetwork::Internal;
-KSocketBuffer::KSocketBuffer(Q_LONG size)
+KSocketBuffer::KSocketBuffer(TQ_LONG size)
: m_mutex(true), m_offset(0), m_size(size), m_length(0)
{
}
@@ -75,9 +75,9 @@ bool KSocketBuffer::canReadLine() const
// walk the buffer
for ( ; it != end; ++it)
{
- if ((*it).find('\n', offset) != -1)
+ if ((*it).tqfind('\n', offset) != -1)
return true;
- if ((*it).find('\r', offset) != -1)
+ if ((*it).tqfind('\r', offset) != -1)
return true;
offset = 0;
}
@@ -92,7 +92,7 @@ TQCString KSocketBuffer::readLine()
TQMutexLocker locker(&m_mutex);
- // find the offset of the newline in the buffer
+ // tqfind the offset of the newline in the buffer
int newline = 0;
TQValueListConstIterator<TQByteArray> it = m_list.constBegin(),
end = m_list.constEnd();
@@ -101,7 +101,7 @@ TQCString KSocketBuffer::readLine()
// walk the buffer
for ( ; it != end; ++it)
{
- int posnl = (*it).find('\n', offset);
+ int posnl = (*it).tqfind('\n', offset);
if (posnl == -1)
{
// not found in this one
@@ -120,17 +120,17 @@ TQCString KSocketBuffer::readLine()
return result;
}
-Q_LONG KSocketBuffer::length() const
+TQ_LONG KSocketBuffer::length() const
{
return m_length;
}
-Q_LONG KSocketBuffer::size() const
+TQ_LONG KSocketBuffer::size() const
{
return m_size;
}
-bool KSocketBuffer::setSize(Q_LONG size)
+bool KSocketBuffer::setSize(TQ_LONG size)
{
m_size = size;
if (size == -1 || m_length < m_size)
@@ -147,7 +147,7 @@ bool KSocketBuffer::setSize(Q_LONG size)
return (m_length - m_size) == consumeBuffer(0L, m_length - m_size, true);
}
-Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
+TQ_LONG KSocketBuffer::feedBuffer(const char *data, TQ_LONG len)
{
if (data == 0L || len == 0)
return 0; // nothing to write
@@ -168,7 +168,7 @@ Q_LONG KSocketBuffer::feedBuffer(const char *data, Q_LONG len)
return len;
}
-Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discard)
+TQ_LONG KSocketBuffer::consumeBuffer(char *destbuffer, TQ_LONG maxlen, bool discard)
{
if (maxlen == 0 || isEmpty())
return 0;
@@ -176,7 +176,7 @@ Q_LONG KSocketBuffer::consumeBuffer(char *destbuffer, Q_LONG maxlen, bool discar
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
- Q_LONG copied = 0;
+ TQ_LONG copied = 0;
// walk the buffer
while (it != end && maxlen)
@@ -228,7 +228,7 @@ void KSocketBuffer::clear()
m_length = 0;
}
-Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
+TQ_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isEmpty())
return 0;
@@ -238,7 +238,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
TQValueListIterator<TQByteArray> it = m_list.begin(),
end = m_list.end();
TQIODevice::Offset offset = m_offset;
- Q_LONG written = 0;
+ TQ_LONG written = 0;
// walk the buffer
while (it != end && (len || len == -1))
@@ -248,11 +248,11 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
// better by concatenating a few of them into a big buffer
// question is: how big should that buffer be? 2 kB should be enough
- Q_ULONG bufsize = 1460;
+ TQ_ULONG bufsize = 1460;
if (len != -1 && len < bufsize)
bufsize = len;
TQByteArray buf(bufsize);
- Q_LONG count = 0;
+ TQ_LONG count = 0;
while (it != end && count + ((*it).size() - offset) <= bufsize)
{
@@ -273,7 +273,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
}
// now try to write those bytes
- Q_LONG wrote = dev->writeBlock(buf, count);
+ TQ_LONG wrote = dev->writeBlock(buf, count);
if (wrote == -1)
// error?
@@ -293,7 +293,7 @@ Q_LONG KSocketBuffer::sendTo(KActiveSocketBase* dev, Q_LONG len)
return written;
}
-Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
+TQ_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, TQ_LONG len)
{
if (len == 0 || isFull())
return 0;
@@ -310,7 +310,7 @@ Q_LONG KSocketBuffer::receiveFrom(KActiveSocketBase* dev, Q_LONG len)
if (m_size != -1 && len > (m_size - m_length))
len = m_size - m_length;
- // here, len contains just as many bytes as we're supposed to read
+ // here, len tqcontains just as many bytes as we're supposed to read
// now do the reading
TQByteArray a(len);
diff --git a/kdecore/network/ksocketbuffer_p.h b/kdecore/network/ksocketbuffer_p.h
index a4a0d6a9e..0b8e96205 100644
--- a/kdecore/network/ksocketbuffer_p.h
+++ b/kdecore/network/ksocketbuffer_p.h
@@ -53,7 +53,7 @@ public:
*
* @param size the maximum size of the buffer
*/
- KSocketBuffer(Q_LONG size = -1);
+ KSocketBuffer(TQ_LONG size = -1);
/**
* Copy constructor.
@@ -86,7 +86,7 @@ public:
*
* @sa size
*/
- virtual Q_LONG length() const;
+ virtual TQ_LONG length() const;
/**
* Retrieves the buffer size. The value of -1 indicates that
@@ -94,7 +94,7 @@ public:
*
* @sa length for the length of the data stored
*/
- virtual Q_LONG size() const;
+ virtual TQ_LONG size() const;
/**
* Sets the size of the buffer, if allowed.
@@ -103,7 +103,7 @@ public:
* @returns true on success, false if an error occurred.
* @note if the new size is less than length(), the buffer will be truncated
*/
- virtual bool setSize(Q_LONG size);
+ virtual bool setSize(TQ_LONG size);
/**
* Adds data to the end of the buffer.
@@ -112,7 +112,7 @@ public:
* @param len the data length, in bytes
* @returns the number of bytes added to the end of the buffer.
*/
- virtual Q_LONG feedBuffer(const char *data, Q_LONG len);
+ virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len);
/**
* Clears the buffer.
@@ -127,7 +127,7 @@ public:
* @param discard if true, the bytes copied will be discarded
* @returns the number of bytes copied from the buffer
*/
- virtual Q_LONG consumeBuffer(char *data, Q_LONG maxlen, bool discard = true);
+ virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard = true);
/**
* Sends at most @p len bytes of data to the I/O Device.
@@ -137,7 +137,7 @@ public:
* @returns the number of bytes sent and discarded from the buffer, -1
* indicates an error.
*/
- virtual Q_LONG sendTo(KActiveSocketBase* device, Q_LONG len = -1);
+ virtual TQ_LONG sendTo(KActiveSocketBase* device, TQ_LONG len = -1);
/**
* Tries to receive @p len bytes of data from the I/O device.
@@ -148,15 +148,15 @@ public:
* @returns the number of bytes received and copied into the buffer,
* -1 indicates an error.
*/
- virtual Q_LONG receiveFrom(KActiveSocketBase* device, Q_LONG len = -1);
+ virtual TQ_LONG receiveFrom(KActiveSocketBase* device, TQ_LONG len = -1);
protected:
mutable TQMutex m_mutex;
TQValueList<TQByteArray> m_list;
TQIODevice::Offset m_offset; ///< offset of the start of data in the first element
- Q_LONG m_size; ///< the maximum length of the buffer
- mutable Q_LONG m_length;
+ TQ_LONG m_size; ///< the maximum length of the buffer
+ mutable TQ_LONG m_length;
};
} } // namespace KNetwork::Internal
diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp
index 53a16ca0a..793642bf9 100644
--- a/kdecore/network/ksocketdevice.cpp
+++ b/kdecore/network/ksocketdevice.cpp
@@ -365,7 +365,7 @@ bool KSocketDevice::disconnect()
}
#ifdef USE_QT3
-Q_LONG KSocketDevice::bytesAvailable() const
+TQ_LONG KSocketDevice::bytesAvailable() const
#endif
#ifdef USE_QT4
qint64 KSocketDevice::bytesAvailable() const
@@ -381,7 +381,7 @@ qint64 KSocketDevice::bytesAvailable() const
return nchars;
}
-Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
+TQ_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
{
if (m_sockfd == -1)
return -1; // there won't ever be anything to read...
@@ -393,7 +393,7 @@ Q_LONG KSocketDevice::waitForMore(int msecs, bool *timeout)
return bytesAvailable();
}
-static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int do_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
{
socklen_t len;
if (from)
@@ -419,7 +419,7 @@ static int do_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress
return 0;
}
-Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -440,7 +440,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from)
+TQ_LONG KSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -461,7 +461,7 @@ Q_LONG KSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from
return retval;
}
-Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -482,7 +482,7 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -503,12 +503,12 @@ Q_LONG KSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from
return retval;
}
-Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len)
{
return writeBlock(data, len, KSocketAddress());
}
-Q_LONG KSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
if (m_sockfd == -1)
@@ -884,7 +884,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory)
void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities)
{
TQMutexLocker locker(&defaultImplFactoryMutex);
- if (factories.contains(capabilities))
+ if (factories.tqcontains(capabilities))
delete factories[capabilities];
factories.insert(capabilities, factory);
}
diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h
index 5f86687b2..a6dd4c4d0 100644
--- a/kdecore/network/ksocketdevice.h
+++ b/kdecore/network/ksocketdevice.h
@@ -124,7 +124,7 @@ public:
/**
* Returns the set of capabilities this socket class implements.
- * The set of capabilities is defined as an OR-ed mask of
+ * The set of capabilities is defined as an OR-ed tqmask of
* @ref Capabilities bits.
*
* The default implementation is guaranteed to always return 0. That
@@ -199,7 +199,7 @@ public:
* Returns the number of bytes available for reading without blocking.
*/
#ifdef USE_QT3
- virtual Q_LONG bytesAvailable() const;
+ virtual TQ_LONG bytesAvailable() const;
#endif
#ifdef USE_QT4
virtual qint64 bytesAvailable() const;
@@ -211,37 +211,37 @@ public:
* This function is a wrapper against @ref poll. This function will wait
* for any read events.
*/
- virtual Q_LONG waitForMore(int msecs, bool *timeout = 0L);
+ virtual TQ_LONG waitForMore(int msecs, bool *timeout = 0L);
/**
* Reads data from this socket.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
/**
* Reads data and the source address from this socket.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Peeks data in the socket.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
/**
* Peeks the data in the socket and the source address.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Writes data to the socket.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
/**
* Writes the given data to the given destination address.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Returns this socket's local address.
diff --git a/kdecore/network/ksockssocketdevice.cpp b/kdecore/network/ksockssocketdevice.cpp
index f67b90bc9..b9fcb6cdd 100644
--- a/kdecore/network/ksockssocketdevice.cpp
+++ b/kdecore/network/ksockssocketdevice.cpp
@@ -190,7 +190,7 @@ KSocksSocketDevice* KSocksSocketDevice::accept()
return new KSocksSocketDevice(newfd);
}
-static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
+static int socks_read_common(int sockfd, char *data, TQ_ULONG maxlen, KSocketAddress* from, ssize_t &retval, bool peek = false)
{
kde_socklen_t len;
if (from)
@@ -214,7 +214,7 @@ static int socks_read_common(int sockfd, char *data, Q_ULONG maxlen, KSocketAddr
return 0;
}
-Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -235,7 +235,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress &from)
+TQ_LONG KSocksSocketDevice::readBlock(char *data, TQ_ULONG maxlen, KSocketAddress &from)
{
resetError();
if (m_sockfd == -1)
@@ -256,7 +256,7 @@ Q_LONG KSocksSocketDevice::readBlock(char *data, Q_ULONG maxlen, KSocketAddress
return retval;
}
-Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
+TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen)
{
resetError();
if (m_sockfd == -1)
@@ -277,7 +277,7 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen)
return retval;
}
-Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from)
+TQ_LONG KSocksSocketDevice::peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from)
{
resetError();
if (m_sockfd == -1)
@@ -298,12 +298,12 @@ Q_LONG KSocksSocketDevice::peekBlock(char *data, Q_ULONG maxlen, KSocketAddress&
return retval;
}
-Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len)
+TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len)
{
return writeBlock(data, len, KSocketAddress());
}
-Q_LONG KSocksSocketDevice::writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to)
+TQ_LONG KSocksSocketDevice::writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to)
{
resetError();
if (m_sockfd == -1)
diff --git a/kdecore/network/ksockssocketdevice.h b/kdecore/network/ksockssocketdevice.h
index 62de23f05..1f8453836 100644
--- a/kdecore/network/ksockssocketdevice.h
+++ b/kdecore/network/ksockssocketdevice.h
@@ -83,20 +83,20 @@ public:
/**
* Overrides reading.
*/
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen);
- virtual Q_LONG readBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen);
+ virtual TQ_LONG readBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Overrides peeking.
*/
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen);
- virtual Q_LONG peekBlock(char *data, Q_ULONG maxlen, KSocketAddress& from);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen);
+ virtual TQ_LONG peekBlock(char *data, TQ_ULONG maxlen, KSocketAddress& from);
/**
* Overrides writing.
*/
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len);
- virtual Q_LONG writeBlock(const char *data, Q_ULONG len, const KSocketAddress& to);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len);
+ virtual TQ_LONG writeBlock(const char *data, TQ_ULONG len, const KSocketAddress& to);
/**
* Overrides getting socket address.
diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp
index 07e3555fa..abb9edaaa 100644
--- a/kdecore/network/ksrvresolverworker.cpp
+++ b/kdecore/network/ksrvresolverworker.cpp
@@ -51,11 +51,11 @@ bool KSrvResolverWorker::preprocess()
return false;
TQString node = nodeName();
- if (node.find('%') != -1)
- node.truncate(node.find('%'));
+ if (node.tqfind('%') != -1)
+ node.truncate(node.tqfind('%'));
- if (node.isEmpty() || node == TQString::fromLatin1("*") ||
- node == TQString::fromLatin1("localhost"))
+ if (node.isEmpty() || node == TQString::tqfromLatin1("*") ||
+ node == TQString::tqfromLatin1("localhost"))
return false; // empty == localhost
encodedName = KResolver::domainToAscii(node);
@@ -225,7 +225,7 @@ bool KSrvResolverWorker::postprocess()
void KSrvResolverWorker::customEvent(TQCustomEvent*)
{
- dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv);
+ dns = new TQDns(TQString::tqfromLatin1(encodedName), TQDns::Srv);
TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady()));
}
diff --git a/kdecore/network/ksrvresolverworker_p.h b/kdecore/network/ksrvresolverworker_p.h
index 90074214f..df79f6c16 100644
--- a/kdecore/network/ksrvresolverworker_p.h
+++ b/kdecore/network/ksrvresolverworker_p.h
@@ -47,8 +47,8 @@ namespace KNetwork
struct Entry
{
TQString name;
- Q_UINT16 port;
- Q_UINT16 weight;
+ TQ_UINT16 port;
+ TQ_UINT16 weight;
KNetwork::KResolver* resolver;
};
@@ -57,7 +57,7 @@ namespace KNetwork
PriorityClass() : totalWeight(0) { }
TQValueList<Entry> entries;
- Q_UINT16 totalWeight;
+ TQ_UINT16 totalWeight;
};
private:
@@ -66,7 +66,7 @@ namespace KNetwork
TQCString encodedName;
TQSemaphore *sem;
- typedef TQMap<Q_UINT16, PriorityClass> Results;
+ typedef TQMap<TQ_UINT16, PriorityClass> Results;
Results myResults;
public:
diff --git a/kdecore/network/kstreamsocket.cpp b/kdecore/network/kstreamsocket.cpp
index 8ca4f91f6..5f4fa6a0d 100644
--- a/kdecore/network/kstreamsocket.cpp
+++ b/kdecore/network/kstreamsocket.cpp
@@ -246,7 +246,7 @@ void KStreamSocket::connectionEvent()
// try to bind
if (!bindLocallyFor(r))
{
- // could not find a matching family
+ // could not tqfind a matching family
++d->peer;
continue;
}