diff options
author | Michele Calgaro <[email protected]> | 2024-01-12 11:17:33 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-15 11:09:32 +0900 |
commit | 7f03918f8df7479b0e1a88288066201a301e87bf (patch) | |
tree | ef42e0c7ecbd6d292ca5aa7f3aeca141dd65cdb1 /tdecore/network | |
parent | ccaaecf59c0e607be633c45ad3b7bb1ef29e981f (diff) | |
download | tdelibs-7f03918f8df7479b0e1a88288066201a301e87bf.tar.gz tdelibs-7f03918f8df7479b0e1a88288066201a301e87bf.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit ba3b5b77e1a430dc7197df20872ba46ce2fb6fa7)
Diffstat (limited to 'tdecore/network')
-rw-r--r-- | tdecore/network/kbufferedsocket.cpp | 4 | ||||
-rw-r--r-- | tdecore/network/kclientsocketbase.cpp | 18 | ||||
-rw-r--r-- | tdecore/network/kdatagramsocket.cpp | 14 | ||||
-rw-r--r-- | tdecore/network/kresolver.cpp | 2 | ||||
-rw-r--r-- | tdecore/network/kresolver.h | 4 | ||||
-rw-r--r-- | tdecore/network/kserversocket.cpp | 16 | ||||
-rw-r--r-- | tdecore/network/kserversocket.h | 8 | ||||
-rw-r--r-- | tdecore/network/ksrvresolverworker.cpp | 2 | ||||
-rw-r--r-- | tdecore/network/kstreamsocket.cpp | 20 | ||||
-rw-r--r-- | tdecore/network/kstreamsocket.h | 16 |
10 files changed, 52 insertions, 52 deletions
diff --git a/tdecore/network/kbufferedsocket.cpp b/tdecore/network/kbufferedsocket.cpp index 51e3db002..08f899c8a 100644 --- a/tdecore/network/kbufferedsocket.cpp +++ b/tdecore/network/kbufferedsocket.cpp @@ -208,7 +208,7 @@ void TDEBufferedSocket::enableRead(bool enable) if (enable && state() != Connected && d->input && !d->input->isEmpty()) // this means the buffer is still dirty // allow the signal to be emitted - TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity())); + TQTimer::singleShot(0, this, TQ_SLOT(slotReadActivity())); } void TDEBufferedSocket::enableWrite(bool enable) @@ -358,7 +358,7 @@ void TDEBufferedSocket::slotReadActivity() { // buffer isn't empty // keep emitting signals till it is - TQTimer::singleShot(0, this, TQT_SLOT(slotReadActivity())); + TQTimer::singleShot(0, this, TQ_SLOT(slotReadActivity())); emit readyRead(); } } diff --git a/tdecore/network/kclientsocketbase.cpp b/tdecore/network/kclientsocketbase.cpp index 48cbbc644..25eb34d8e 100644 --- a/tdecore/network/kclientsocketbase.cpp +++ b/tdecore/network/kclientsocketbase.cpp @@ -144,10 +144,10 @@ bool KClientSocketBase::lookup() // don't restart the lookups if they had succeeded and // the input values weren't changed - TQObject::connect(&d->peerResolver, TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedSlot())); - TQObject::connect(&d->localResolver, TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedSlot())); + TQObject::connect(&d->peerResolver, TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedSlot())); + TQObject::connect(&d->localResolver, TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedSlot())); if (d->localResolver.status() <= 0) d->localResolver.start(); @@ -164,7 +164,7 @@ bool KClientSocketBase::lookup() if (blocking()) lookupFinishedSlot(); else - TQTimer::singleShot(0, this, TQT_SLOT(lookupFinishedSlot())); + TQTimer::singleShot(0, this, TQ_SLOT(lookupFinishedSlot())); } else { @@ -427,8 +427,8 @@ void KClientSocketBase::lookupFinishedSlot() if (d->peerResolver.isRunning() || d->localResolver.isRunning() || state() != HostLookup) return; - TQObject::disconnect(&d->peerResolver, 0L, this, TQT_SLOT(lookupFinishedSlot())); - TQObject::disconnect(&d->localResolver, 0L, this, TQT_SLOT(lookupFinishedSlot())); + TQObject::disconnect(&d->peerResolver, 0L, this, TQ_SLOT(lookupFinishedSlot())); + TQObject::disconnect(&d->localResolver, 0L, this, TQ_SLOT(lookupFinishedSlot())); if (d->peerResolver.status() < 0 || d->localResolver.status() < 0) { setState(Idle); // backtrack @@ -453,7 +453,7 @@ void KClientSocketBase::stateChanging(SocketState newState) if (n) { n->setEnabled(d->enableRead); - TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotReadActivity())); } else return; @@ -462,7 +462,7 @@ void KClientSocketBase::stateChanging(SocketState newState) if (n) { n->setEnabled(d->enableWrite); - TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotWriteActivity())); } else return; diff --git a/tdecore/network/kdatagramsocket.cpp b/tdecore/network/kdatagramsocket.cpp index 97562c687..5fa631560 100644 --- a/tdecore/network/kdatagramsocket.cpp +++ b/tdecore/network/kdatagramsocket.cpp @@ -52,11 +52,11 @@ KDatagramSocket::KDatagramSocket(TQObject* parent, const char *name) localResolver().setFlags(KResolver::Passive); - // TQObject::connect(localResolver(), TQT_SIGNAL(finished(KResolverResults)), - // this, TQT_SLOT(lookupFinishedLocal())); - TQObject::connect(&peerResolver(), TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedPeer())); - TQObject::connect(this, TQT_SIGNAL(hostFound()), this, TQT_SLOT(lookupFinishedLocal())); + // TQObject::connect(localResolver(), TQ_SIGNAL(finished(KResolverResults)), + // this, TQ_SLOT(lookupFinishedLocal())); + TQObject::connect(&peerResolver(), TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedPeer())); + TQObject::connect(this, TQ_SIGNAL(hostFound()), this, TQ_SLOT(lookupFinishedLocal())); } KDatagramSocket::~KDatagramSocket() @@ -265,7 +265,7 @@ void KDatagramSocket::setupSignals() if (n) { n->setEnabled(emitsReadyRead()); - TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadActivity())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotReadActivity())); } else return; @@ -274,7 +274,7 @@ void KDatagramSocket::setupSignals() if (n) { n->setEnabled(emitsReadyWrite()); - TQObject::connect(n, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotWriteActivity())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotWriteActivity())); } else return; diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index 17ab2f068..f80b9209e 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -604,7 +604,7 @@ bool KResolver::resolveAsync(TQObject* userObj, const char *userSlot, int flags, int families) { KResolver* qres = new KResolver(host, service, tqApp, "asynchronous KResolver"); - TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), userObj, userSlot); + TQObject::connect(qres, TQ_SIGNAL(finished(KResolverResults)), userObj, userSlot); qres->setFlags(flags); qres->setFamily(families); qres->d->deleteWhenDone = true; // this is the only difference from the example code diff --git a/tdecore/network/kresolver.h b/tdecore/network/kresolver.h index fd0636417..51e605704 100644 --- a/tdecore/network/kresolver.h +++ b/tdecore/network/kresolver.h @@ -759,7 +759,7 @@ public: * * \code * KResolver* qres = new KResolver(host, service); - * TQObject::connect(qres, TQT_SIGNAL(finished(KResolverResults)), + * TQObject::connect(qres, TQ_SIGNAL(finished(KResolverResults)), * userObj, userSlot); * qres->setFlags(flags); * qres->setFamily(families); @@ -768,7 +768,7 @@ public: * * You should use it like this in your code: * \code - * KResolver::resolveAsync(myObj, TQT_SLOT(mySlot(KResolverResults)), host, service); + * KResolver::resolveAsync(myObj, TQ_SLOT(mySlot(KResolverResults)), host, service); * \endcode * * @param userObj the object whose slot @p userSlot we will connect diff --git a/tdecore/network/kserversocket.cpp b/tdecore/network/kserversocket.cpp index 94532de19..0cfba8fa5 100644 --- a/tdecore/network/kserversocket.cpp +++ b/tdecore/network/kserversocket.cpp @@ -61,15 +61,15 @@ public: TDEServerSocket::TDEServerSocket(TQObject* parent, const char *name) : TQObject(parent, name), d(new TDEServerSocketPrivate) { - TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedSlot())); + TQObject::connect(&d->resolver, TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedSlot())); } TDEServerSocket::TDEServerSocket(const TQString& service, TQObject* parent, const char *name) : TQObject(parent, name), d(new TDEServerSocketPrivate) { - TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedSlot())); + TQObject::connect(&d->resolver, TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedSlot())); d->resolver.setServiceName(service); } @@ -77,8 +77,8 @@ TDEServerSocket::TDEServerSocket(const TQString& node, const TQString& service, TQObject* parent, const char* name) : TQObject(parent, name), d(new TDEServerSocketPrivate) { - TQObject::connect(&d->resolver, TQT_SIGNAL(finished(KResolverResults)), - this, TQT_SLOT(lookupFinishedSlot())); + TQObject::connect(&d->resolver, TQ_SIGNAL(finished(KResolverResults)), + this, TQ_SLOT(lookupFinishedSlot())); setAddress(node, service); } @@ -403,8 +403,8 @@ bool TDEServerSocket::doListen() } // set up ready accept signal - TQObject::connect(socketDevice()->readNotifier(), TQT_SIGNAL(activated(int)), - this, TQT_SIGNAL(readyAccept())); + TQObject::connect(socketDevice()->readNotifier(), TQ_SIGNAL(activated(int)), + this, TQ_SIGNAL(readyAccept())); d->state = TDEServerSocketPrivate::Listening; return true; } diff --git a/tdecore/network/kserversocket.h b/tdecore/network/kserversocket.h index 1455dcb08..637dc92d0 100644 --- a/tdecore/network/kserversocket.h +++ b/tdecore/network/kserversocket.h @@ -50,8 +50,8 @@ class TDEServerSocketPrivate; * \code * TQString service = "http"; * TDEServerSocket *ss = new TDEServerSocket(service); - * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); - * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); + * connect(ss, TQ_SIGNAL(readyAccept()), this, TQ_SLOT(slotReadyAccept())); + * connect(ss, TQ_SIGNAL(gotError(int)), this, TQ_SLOT(slotSocketError(int))); * ss->listen(); * \endcode * @@ -84,8 +84,8 @@ class TDEServerSocketPrivate; * if( !found ) { * // Couldn't connect to any port. * } else { - * connect(ss, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); - * connect(ss, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotSocketError(int))); + * connect(ss, TQ_SIGNAL(readyAccept()), this, TQ_SLOT(slotReadyAccept())); + * connect(ss, TQ_SIGNAL(gotError(int)), this, TQ_SLOT(slotSocketError(int))); * ss->listen(); * } * \endcode diff --git a/tdecore/network/ksrvresolverworker.cpp b/tdecore/network/ksrvresolverworker.cpp index 8f918977e..568e0d22b 100644 --- a/tdecore/network/ksrvresolverworker.cpp +++ b/tdecore/network/ksrvresolverworker.cpp @@ -226,7 +226,7 @@ bool KSrvResolverWorker::postprocess() void KSrvResolverWorker::customEvent(TQCustomEvent*) { dns = new TQDns(TQString::fromLatin1(encodedName), TQDns::Srv); - TQObject::connect(dns, TQT_SIGNAL(resultsReady()), this, TQT_SLOT(dnsResultsReady())); + TQObject::connect(dns, TQ_SIGNAL(resultsReady()), this, TQ_SLOT(dnsResultsReady())); } void KSrvResolverWorker::dnsResultsReady() diff --git a/tdecore/network/kstreamsocket.cpp b/tdecore/network/kstreamsocket.cpp index 6ba8dfe8b..a36f8cc78 100644 --- a/tdecore/network/kstreamsocket.cpp +++ b/tdecore/network/kstreamsocket.cpp @@ -61,7 +61,7 @@ KStreamSocket::KStreamSocket(const TQString& node, const TQString& service, setSocketOptions(socketOptions() & ~Blocking); - TQObject::connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeoutSlot())); + TQObject::connect(&d->timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(timeoutSlot())); } KStreamSocket::~KStreamSocket() @@ -130,7 +130,7 @@ bool KStreamSocket::connect(const TQString& node, const TQString& service) // connection hasn't started yet if (!blocking()) { - TQObject::connect(this, TQT_SIGNAL(hostFound()), TQT_SLOT(hostFoundSlot())); + TQObject::connect(this, TQ_SIGNAL(hostFound()), TQ_SLOT(hostFoundSlot())); return lookup(); } @@ -196,10 +196,10 @@ bool KStreamSocket::connect(const KResolverEntry& entry) void KStreamSocket::hostFoundSlot() { - TQObject::disconnect(this, TQT_SLOT(hostFoundSlot())); + TQObject::disconnect(this, TQ_SLOT(hostFoundSlot())); if (timeout() > 0) d->timer.start(timeout(), true); - TQTimer::singleShot(0, this, TQT_SLOT(connectionEvent())); + TQTimer::singleShot(0, this, TQ_SLOT(connectionEvent())); } void KStreamSocket::connectionEvent() @@ -267,13 +267,13 @@ void KStreamSocket::connectionEvent() if (socketDevice()->error() == InProgress) { TQSocketNotifier *n = socketDevice()->readNotifier(); - TQObject::connect(n, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(connectionEvent())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(connectionEvent())); n->setEnabled(true); n = socketDevice()->writeNotifier(); - TQObject::connect(n, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(connectionEvent())); + TQObject::connect(n, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(connectionEvent())); n->setEnabled(true); return; // wait for activity @@ -350,8 +350,8 @@ bool KStreamSocket::bindLocallyFor(const KResolverEntry& peer) void KStreamSocket::connectionSucceeded(const KResolverEntry& peer) { - TQObject::disconnect(socketDevice()->readNotifier(), 0, this, TQT_SLOT(connectionEvent())); - TQObject::disconnect(socketDevice()->writeNotifier(), 0, this, TQT_SLOT(connectionEvent())); + TQObject::disconnect(socketDevice()->readNotifier(), 0, this, TQ_SLOT(connectionEvent())); + TQObject::disconnect(socketDevice()->writeNotifier(), 0, this, TQ_SLOT(connectionEvent())); resetError(); setFlags(IO_Sequential | IO_Raw | IO_ReadWrite | IO_Open | IO_Async); diff --git a/tdecore/network/kstreamsocket.h b/tdecore/network/kstreamsocket.h index 72d176fa3..a7557d585 100644 --- a/tdecore/network/kstreamsocket.h +++ b/tdecore/network/kstreamsocket.h @@ -70,14 +70,14 @@ class KStreamSocketPrivate; * : socket(hostname, port) * { * // connect signals to our slots - * TQObject::connect(&socket, TQT_SIGNAL(connected(const KResolverEntry&)), - * this, TQT_SLOT(slotSocketConnected())); - * TQObject::connect(&socket, TQT_SIGNAL(gotError(int)), - * this, TQT_SLOT(slotSocketError(int))); - * TQObject::connect(&socket, TQT_SIGNAL(readyRead()), - * this, TQT_SLOT(slotSocketReadyToRead())); - * TQObject::connect(&socket, TQT_SIGNAL(readyWrite()), - * this, TQT_SLOT(slotSocketReadyToWrite())); + * TQObject::connect(&socket, TQ_SIGNAL(connected(const KResolverEntry&)), + * this, TQ_SLOT(slotSocketConnected())); + * TQObject::connect(&socket, TQ_SIGNAL(gotError(int)), + * this, TQ_SLOT(slotSocketError(int))); + * TQObject::connect(&socket, TQ_SIGNAL(readyRead()), + * this, TQ_SLOT(slotSocketReadyToRead())); + * TQObject::connect(&socket, TQ_SIGNAL(readyWrite()), + * this, TQ_SLOT(slotSocketReadyToWrite())); * * // set non-blocking mode in order to work asynchronously * socket.setBlocking(false); |