summaryrefslogtreecommitdiffstats
path: root/kdecore/network/ksocketbuffer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdecore/network/ksocketbuffer.cpp
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/network/ksocketbuffer.cpp')
-rw-r--r--kdecore/network/ksocketbuffer.cpp36
1 files changed, 18 insertions, 18 deletions
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);