diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-26 14:53:30 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-31 10:10:06 +0900 |
commit | e8f6750e65767709575720eb6da1402e6ef20bad (patch) | |
tree | d1d2db5eff55dc1f66155b8f4ef2ba260a1b1b3c /tdecore/network | |
parent | 97fea74e68727e260cb1901763ad4d43f7f96342 (diff) | |
download | tdelibs-e8f6750e65767709575720eb6da1402e6ef20bad.tar.gz tdelibs-e8f6750e65767709575720eb6da1402e6ef20bad.zip |
Drop USE_TQT4 code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 57af4f9d87ac88216a3bbcebaeed55db07a8948d)
Diffstat (limited to 'tdecore/network')
-rw-r--r-- | tdecore/network/kbufferedsocket.cpp | 10 | ||||
-rw-r--r-- | tdecore/network/kbufferedsocket.h | 17 | ||||
-rw-r--r-- | tdecore/network/kclientsocketbase.cpp | 17 | ||||
-rw-r--r-- | tdecore/network/kclientsocketbase.h | 16 | ||||
-rw-r--r-- | tdecore/network/tdesocketbase.h | 9 | ||||
-rw-r--r-- | tdecore/network/tdesocketdevice.cpp | 5 | ||||
-rw-r--r-- | tdecore/network/tdesocketdevice.h | 5 |
7 files changed, 3 insertions, 76 deletions
diff --git a/tdecore/network/kbufferedsocket.cpp b/tdecore/network/kbufferedsocket.cpp index aaac54b03..ff2e11866 100644 --- a/tdecore/network/kbufferedsocket.cpp +++ b/tdecore/network/kbufferedsocket.cpp @@ -93,12 +93,7 @@ void TDEBufferedSocket::close() } } -#ifdef USE_QT3 TQ_LONG TDEBufferedSocket::bytesAvailable() const -#endif -#ifdef USE_QT4 -qint64 TDEBufferedSocket::bytesAvailable() const -#endif { if (!d->input) return KStreamSocket::bytesAvailable(); @@ -284,12 +279,7 @@ TDEIOBufferBase* TDEBufferedSocket::outputBuffer() return d->output; } -#ifdef USE_QT3 TQ_ULONG TDEBufferedSocket::bytesToWrite() const -#endif -#ifdef USE_QT4 -qint64 TDEBufferedSocket::bytesToWrite() const -#endif { if (!d->output) return 0; diff --git a/tdecore/network/kbufferedsocket.h b/tdecore/network/kbufferedsocket.h index 180314525..76c5dd057 100644 --- a/tdecore/network/kbufferedsocket.h +++ b/tdecore/network/kbufferedsocket.h @@ -99,12 +99,7 @@ public: /** * Make use of the buffers. */ -#ifdef USE_QT3 virtual TQ_LONG bytesAvailable() const; -#endif -#ifdef USE_QT4 - virtual qint64 bytesAvailable() const; -#endif /** * Make use of buffers. @@ -183,12 +178,7 @@ public: /** * Returns the length of the output buffer. */ -#ifdef USE_QT3 virtual TQ_ULONG bytesToWrite() const; -#endif -#ifdef USE_QT4 - virtual qint64 bytesToWrite() const; -#endif /** * Closes the socket and discards any output data that had been buffered @@ -208,8 +198,6 @@ public: */ TQCString readLine(); - // KDE4: make virtual, add timeout to match the Qt4 signature - // and move to another class up the hierarchy /** * Blocks until the connection is either established, or completely * failed. @@ -255,12 +243,7 @@ public: * which required a call to reset() in order to be able to connect again * using the same device. This is not necessary in TDEBufferedSocket any more. */ -#ifdef USE_QT3 inline void reset() -#endif -#ifdef USE_QT4 - inline bool reset() -#endif { closeNow(); } }; diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp index eaf669bb9..31df9a804 100644 --- a/tdecore/network/kclientsocketbase.cpp +++ b/tdecore/network/kclientsocketbase.cpp @@ -48,16 +48,8 @@ public: }; KClientSocketBase::KClientSocketBase(TQObject *parent, const char *name) : -#ifdef USE_QT4 -#else // USE_QT4 - TQObject(parent, name), -#endif // USE_QT4 - d(new KClientSocketBasePrivate) -{ -#ifdef USE_QT4 - setParent(parent); - setObjectName(name); -#endif // USE_QT4 + TQObject(parent, name), d(new KClientSocketBasePrivate) +{ d->state = Idle; d->enableRead = true; d->enableWrite = false; @@ -286,12 +278,7 @@ void KClientSocketBase::close() } // This function is unlike all the others because it is const -#ifdef USE_QT3 TQ_LONG KClientSocketBase::bytesAvailable() const -#endif -#ifdef USE_QT4 -qint64 KClientSocketBase::bytesAvailable() const -#endif { return socketDevice()->bytesAvailable(); } diff --git a/tdecore/network/kclientsocketbase.h b/tdecore/network/kclientsocketbase.h index 647a86c90..246987859 100644 --- a/tdecore/network/kclientsocketbase.h +++ b/tdecore/network/kclientsocketbase.h @@ -32,10 +32,6 @@ #include "kresolver.h" #include <tdelibs_export.h> -#ifdef Q_MOC_RUN -#define USE_QT4 -#endif // Q_MOC_RUN - namespace KNetwork { class KClientSocketBasePrivate; @@ -50,12 +46,7 @@ class KClientSocketBasePrivate; * * @author Thiago Macieira <thiago.macieira@kdemail.net> */ -class TDECORE_EXPORT KClientSocketBase : -#ifdef USE_QT4 -#else // USE_QT4 -public TQObject, -#endif // USE_QT4 -public KActiveSocketBase +class TDECORE_EXPORT KClientSocketBase : public TQObject, public KActiveSocketBase { TQ_OBJECT @@ -302,12 +293,7 @@ public: * Returns the number of bytes available on this socket. * Reimplemented from TDESocketBase. */ -#ifdef USE_QT3 virtual TQ_LONG bytesAvailable() const; -#endif -#ifdef USE_QT4 - virtual qint64 bytesAvailable() const; -#endif /** * Waits for more data. Reimplemented from TDESocketBase. diff --git a/tdecore/network/tdesocketbase.h b/tdecore/network/tdesocketbase.h index 706900117..e50f899dc 100644 --- a/tdecore/network/tdesocketbase.h +++ b/tdecore/network/tdesocketbase.h @@ -504,11 +504,7 @@ public: * This call is not supported on sockets. Reimplemented from TQIODevice. * This will always return 0. */ -#ifdef USE_QT4 - virtual qint64 size() const -#else // USE_QT4 virtual Offset size() const -#endif // USE_QT4 { return 0; } /** @@ -536,12 +532,7 @@ public: * Returns the number of bytes available for reading without * blocking. */ -#ifdef USE_QT3 virtual TQ_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/tdecore/network/tdesocketdevice.cpp b/tdecore/network/tdesocketdevice.cpp index 6f3ec755b..3d683b405 100644 --- a/tdecore/network/tdesocketdevice.cpp +++ b/tdecore/network/tdesocketdevice.cpp @@ -364,12 +364,7 @@ bool TDESocketDevice::disconnect() return true; // all is well } -#ifdef USE_QT3 TQ_LONG TDESocketDevice::bytesAvailable() const -#endif -#ifdef USE_QT4 -qint64 TDESocketDevice::bytesAvailable() const -#endif { if (m_sockfd == -1) return -1; // there's nothing to read in a closed socket diff --git a/tdecore/network/tdesocketdevice.h b/tdecore/network/tdesocketdevice.h index e5477c0c6..b01bfbc41 100644 --- a/tdecore/network/tdesocketdevice.h +++ b/tdecore/network/tdesocketdevice.h @@ -198,12 +198,7 @@ public: /** * Returns the number of bytes available for reading without blocking. */ -#ifdef USE_QT3 virtual TQ_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. |