diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/msn/transport.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/transport.cpp')
-rw-r--r-- | kopete/protocols/msn/transport.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kopete/protocols/msn/transport.cpp b/kopete/protocols/msn/transport.cpp index 904e9411..6b913816 100644 --- a/kopete/protocols/msn/transport.cpp +++ b/kopete/protocols/msn/transport.cpp @@ -34,8 +34,8 @@ using namespace KNetwork; namespace PeerToPeer { -Transport::Transport(TQObject* parent, const char* name) - : TQObject(parent, name) +Transport::Transport(TQObject* tqparent, const char* name) + : TQObject(tqparent, name) { mFormatter = new PeerToPeer::MessageFormatter(this); } @@ -47,11 +47,11 @@ Transport::~Transport() //BEGIN Public Methods -TransportBridge* Transport::getBridge (const TQString& to, Q_UINT16 port, TransportBridgeType type, const TQString& identifier) +TransportBridge* Transport::getBridge (const TQString& to, TQ_UINT16 port, TransportBridgeType type, const TQString& identifier) { TransportBridge *bridge = 0l; KInetSocketAddress address; - if (mAddresses.contains(to)) + if (mAddresses.tqcontains(to)) { address = mAddresses[to]; } @@ -103,15 +103,15 @@ void Transport::slotOnReceive(const TQString& contact, const TQByteArray& bytes) -TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name) -: TQObject(parent, name) +TransportBridge::TransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* tqparent, const char* name) +: TQObject(tqparent, name) { mAddress = to; mFormatter = formatter; } -TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name) -: TQObject(parent, name) +TransportBridge::TransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* tqparent, const char* name) +: TQObject(tqparent, name) { mSocket = socket; mAddress = mSocket->peerAddress(); @@ -166,8 +166,8 @@ void TransportBridge::slotOnSocketReceive() -TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* parent, const char* name) -: TransportBridge(to, formatter, parent, name) +TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, MessageFormatter* formatter, TQObject* tqparent, const char* name) +: TransportBridge(to, formatter, tqparent, name) { mSocket = new KStreamSocket(mAddress.ipAddress().toString(), TQString::number(mAddress.port()), this); mSocket->setBlocking(false); @@ -176,8 +176,8 @@ TcpTransportBridge::TcpTransportBridge(const KNetwork::KInetSocketAddress& to, M mConnected = false; } -TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* parent, const char* name) -: TransportBridge(socket, formatter, parent, name) +TcpTransportBridge::TcpTransportBridge(KNetwork::KClientSocketBase* socket, MessageFormatter* formatter, TQObject* tqparent, const char* name) +: TransportBridge(socket, formatter, tqparent, name) { mConnected = (mSocket->state() == KStreamSocket::Open) ? true : false; mSocket->setBlocking(false); @@ -213,7 +213,7 @@ void TcpTransportBridge::slotOnDisconnect() void TcpTransportBridge::slotOnError(int errorCode) { kdDebug(14140) << k_funcinfo << "Bridge (" << name() << ") ERROR occurred on {" << mSocket->localAddress().toString() << " <-> " << mSocket->peerAddress().toString() << "} - " << mSocket->errorString() << endl; - emit bridgeError(TQString("Bridge ERROR %1: %2").arg(errorCode).arg(mSocket->errorString())); + emit bridgeError(TQString("Bridge ERROR %1: %2").tqarg(errorCode).tqarg(mSocket->errorString())); if (mConnected){ mSocket->disconnect(); mConnected = false; @@ -245,7 +245,7 @@ void TcpTransportBridge::slotOnSocketConnect() mVerified = true; TQString foo = "foo\0"; mSocket->writeBlock(foo.ascii(), foo.length()); - foo = TQString::null; + foo = TQString(); emit bridgeConnect(); } @@ -311,7 +311,7 @@ void TcpTransportBridge::slotOnSocketConnectTimeout() -TcpTransportBridge::Buffer::Buffer(Q_UINT32 length) +TcpTransportBridge::Buffer::Buffer(TQ_UINT32 length) : TQByteArray(length) { } @@ -330,7 +330,7 @@ void TcpTransportBridge::Buffer::write(const TQByteArray& bytes) } } -TQByteArray TcpTransportBridge::Buffer::read(Q_UINT32 length) +TQByteArray TcpTransportBridge::Buffer::read(TQ_UINT32 length) { if (length >= size()) return TQByteArray(); |