diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-05 21:54:32 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-05 21:54:32 +0000 |
commit | 229a34d015564ecd61be45648f15044ea3e4ec8a (patch) | |
tree | b58510cd03109802f5b2d1a7cd4ad429ea01ec88 /kdecore/network | |
parent | 6d1c49c8bd45ba0a096006fb2df45ce1e4ba901b (diff) | |
download | tdelibs-229a34d015564ecd61be45648f15044ea3e4ec8a.tar.gz tdelibs-229a34d015564ecd61be45648f15044ea3e4ec8a.zip |
Various compilation fixes.
Most are to specify types where ambiguity is present,
so for example 'T' becomes (QChar)'T'
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1159657 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/network')
-rw-r--r-- | kdecore/network/kbufferedsocket.cpp | 10 | ||||
-rw-r--r-- | kdecore/network/kbufferedsocket.h | 15 | ||||
-rw-r--r-- | kdecore/network/kclientsocketbase.cpp | 5 | ||||
-rw-r--r-- | kdecore/network/kclientsocketbase.h | 5 | ||||
-rw-r--r-- | kdecore/network/kresolver.cpp | 2 | ||||
-rw-r--r-- | kdecore/network/ksocketbase.h | 5 | ||||
-rw-r--r-- | kdecore/network/ksocketdevice.cpp | 5 | ||||
-rw-r--r-- | kdecore/network/ksocketdevice.h | 5 |
8 files changed, 51 insertions, 1 deletions
diff --git a/kdecore/network/kbufferedsocket.cpp b/kdecore/network/kbufferedsocket.cpp index 52d826c88..04115c051 100644 --- a/kdecore/network/kbufferedsocket.cpp +++ b/kdecore/network/kbufferedsocket.cpp @@ -93,7 +93,12 @@ void KBufferedSocket::close() } } +#ifdef USE_QT3 Q_LONG KBufferedSocket::bytesAvailable() const +#endif +#ifdef USE_QT4 +qint64 KBufferedSocket::bytesAvailable() const +#endif { if (!d->input) return KStreamSocket::bytesAvailable(); @@ -279,7 +284,12 @@ KIOBufferBase* KBufferedSocket::outputBuffer() return d->output; } +#ifdef USE_QT3 Q_ULONG KBufferedSocket::bytesToWrite() const +#endif +#ifdef USE_QT4 +qint64 KBufferedSocket::bytesToWrite() const +#endif { if (!d->output) return 0; diff --git a/kdecore/network/kbufferedsocket.h b/kdecore/network/kbufferedsocket.h index d99862781..bca034002 100644 --- a/kdecore/network/kbufferedsocket.h +++ b/kdecore/network/kbufferedsocket.h @@ -98,7 +98,12 @@ public: /** * Make use of the buffers. */ +#ifdef USE_QT3 virtual Q_LONG bytesAvailable() const; +#endif +#ifdef USE_QT4 + virtual qint64 bytesAvailable() const; +#endif /** * Make use of buffers. @@ -177,7 +182,12 @@ public: /** * Returns the length of the output buffer. */ +#ifdef USE_QT3 virtual Q_ULONG bytesToWrite() const; +#endif +#ifdef USE_QT4 + virtual qint64 bytesToWrite() const; +#endif /** * Closes the socket and discards any output data that had been buffered @@ -244,7 +254,12 @@ public: * which required a call to reset() in order to be able to connect again * using the same device. This is not necessary in KBufferedSocket any more. */ +#ifdef USE_QT3 inline void reset() +#endif +#ifdef USE_QT4 + inline bool reset() +#endif { closeNow(); } }; diff --git a/kdecore/network/kclientsocketbase.cpp b/kdecore/network/kclientsocketbase.cpp index 2da802d56..7ac3ca3b1 100644 --- a/kdecore/network/kclientsocketbase.cpp +++ b/kdecore/network/kclientsocketbase.cpp @@ -278,7 +278,12 @@ void KClientSocketBase::close() } // This function is unlike all the others because it is const +#ifdef USE_QT3 Q_LONG KClientSocketBase::bytesAvailable() const +#endif +#ifdef USE_QT4 +qint64 KClientSocketBase::bytesAvailable() const +#endif { return socketDevice()->bytesAvailable(); } diff --git a/kdecore/network/kclientsocketbase.h b/kdecore/network/kclientsocketbase.h index 1a6d3b8b1..d4e31b6b3 100644 --- a/kdecore/network/kclientsocketbase.h +++ b/kdecore/network/kclientsocketbase.h @@ -292,7 +292,12 @@ public: * Returns the number of bytes available on this socket. * Reimplemented from KSocketBase. */ +#ifdef USE_QT3 virtual Q_LONG bytesAvailable() const; +#endif +#ifdef USE_QT4 + virtual qint64 bytesAvailable() const; +#endif /** * Waits for more data. Reimplemented from KSocketBase. diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp index 598b6de55..cfb87e3ef 100644 --- a/kdecore/network/kresolver.cpp +++ b/kdecore/network/kresolver.cpp @@ -72,7 +72,7 @@ using namespace KNetwork::Internal; ///////////////////////////////////////////// // class KResolverEntry -class KNetwork::KResolverEntryPrivate: public QShared +class KNetwork::KResolverEntryPrivate: public TQShared { public: KSocketAddress addr; diff --git a/kdecore/network/ksocketbase.h b/kdecore/network/ksocketbase.h index 5ef298847..133086114 100644 --- a/kdecore/network/ksocketbase.h +++ b/kdecore/network/ksocketbase.h @@ -532,7 +532,12 @@ public: * Returns the number of bytes available for reading without * blocking. */ +#ifdef USE_QT3 virtual Q_LONG bytesAvailable() const = 0; +#endif +#ifdef USE_QT4 + virtual qint64 bytesAvailable() const = 0; +#endif /** * Waits up to @p msecs for more data to be available on this socket. diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp index 2885efdb3..53a16ca0a 100644 --- a/kdecore/network/ksocketdevice.cpp +++ b/kdecore/network/ksocketdevice.cpp @@ -364,7 +364,12 @@ bool KSocketDevice::disconnect() return true; // all is well } +#ifdef USE_QT3 Q_LONG KSocketDevice::bytesAvailable() const +#endif +#ifdef USE_QT4 +qint64 KSocketDevice::bytesAvailable() const +#endif { if (m_sockfd == -1) return -1; // there's nothing to read in a closed socket diff --git a/kdecore/network/ksocketdevice.h b/kdecore/network/ksocketdevice.h index 1bf4771c2..5f86687b2 100644 --- a/kdecore/network/ksocketdevice.h +++ b/kdecore/network/ksocketdevice.h @@ -198,7 +198,12 @@ public: /** * Returns the number of bytes available for reading without blocking. */ +#ifdef USE_QT3 virtual Q_LONG bytesAvailable() const; +#endif +#ifdef USE_QT4 + virtual qint64 bytesAvailable() const; +#endif /** * Waits up to @p msecs for more data to be available on this socket. |