diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /lskat/lskat/KRemoteConnect.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lskat/lskat/KRemoteConnect.cpp')
-rw-r--r-- | lskat/lskat/KRemoteConnect.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lskat/lskat/KRemoteConnect.cpp b/lskat/lskat/KRemoteConnect.cpp index f1bcb4f3..315d2a96 100644 --- a/lskat/lskat/KRemoteConnect.cpp +++ b/lskat/lskat/KRemoteConnect.cpp @@ -78,20 +78,20 @@ bool tryserver; SetID(id); if (msg) { - if (msg->GetData(QCString("Port"),prt)) + if (msg->GetData(TQCString("Port"),prt)) { port=(unsigned int)prt; - msg->Remove(QCString("Port")); + msg->Remove(TQCString("Port")); } - if (msg->GetData(QCString("IP"),p,size)) + if (msg->GetData(TQCString("IP"),p,size)) { - IP=QCString(p); - msg->Remove(QCString("IP")); + IP=TQCString(p); + msg->Remove(TQCString("IP")); } - if (msg->GetData(QCString("Name"),p,size)) + if (msg->GetData(TQCString("Name"),p,size)) { - Name=QString::fromUtf8(p); - msg->Remove(QCString("Name")); + Name=TQString::fromUtf8(p); + msg->Remove(TQCString("Name")); } } /* @@ -110,13 +110,13 @@ bool tryserver; { kSocket->enableRead(TRUE); //kSocket->enableWrite(TRUE); - connect(kSocket,SIGNAL(closeEvent(KSocket *)), - this,SLOT(socketClosed(KSocket *))); - connect(kSocket,SIGNAL(readEvent(KSocket *)), - this,SLOT(socketRead(KSocket *))); + connect(kSocket,TQT_SIGNAL(closeEvent(KSocket *)), + this,TQT_SLOT(socketClosed(KSocket *))); + connect(kSocket,TQT_SIGNAL(readEvent(KSocket *)), + this,TQT_SLOT(socketRead(KSocket *))); /* - connect(kSocket,SIGNAL(writeEvent(KSocket *)), - this,SLOT(socketWrite(KSocket *))); + connect(kSocket,TQT_SIGNAL(writeEvent(KSocket *)), + this,TQT_SLOT(socketWrite(KSocket *))); */ /* printf("Socket(%d) %p connection built to a server\n", @@ -127,7 +127,7 @@ bool tryserver; // Send msg if any if (msg->QueryNumberOfKeys()>0) { - msg->AddData(QCString("Server"),(short)QueryID()); + msg->AddData(TQCString("Server"),(short)QueryID()); SendMsg(msg); } @@ -187,8 +187,8 @@ bool KRemoteConnect::OfferServerSocket() printf("Offering socket and publishing stuff\n"); service = new DNSSD::PublicService(Name,LSKAT_SERVICE,port); service->publishAsync(); - connect(kServerSocket,SIGNAL(accepted(KSocket *)), - this,SLOT(socketRequest(KSocket *))); + connect(kServerSocket,TQT_SIGNAL(accepted(KSocket *)), + this,TQT_SLOT(socketRequest(KSocket *))); return true; } @@ -206,13 +206,13 @@ void KRemoteConnect::socketRequest(KSocket *sock) { kSocket->enableRead(TRUE); //kSocket->enableWrite(TRUE); - connect(kSocket,SIGNAL(closeEvent(KSocket *)), - this,SLOT(socketClosed(KSocket *))); - connect(kSocket,SIGNAL(readEvent(KSocket *)), - this,SLOT(socketRead(KSocket *))); + connect(kSocket,TQT_SIGNAL(closeEvent(KSocket *)), + this,TQT_SLOT(socketClosed(KSocket *))); + connect(kSocket,TQT_SIGNAL(readEvent(KSocket *)), + this,TQT_SLOT(socketRead(KSocket *))); /* - connect(kSocket,SIGNAL(writeEvent(KSocket *)), - this,SLOT(socketWrite(KSocket *))); + connect(kSocket,TQT_SIGNAL(writeEvent(KSocket *)), + this,TQT_SLOT(socketWrite(KSocket *))); */ socketStatus=KR_SERVER; delete kServerSocket; // no more connections @@ -220,7 +220,7 @@ void KRemoteConnect::socketRequest(KSocket *sock) if (bufferMsg) { // Delayed sending of init msg - bufferMsg->AddData(QCString("Client"),(short)QueryID()); + bufferMsg->AddData(TQCString("Client"),(short)QueryID()); SendMsg(bufferMsg); delete bufferMsg; bufferMsg=0; @@ -234,14 +234,14 @@ void KRemoteConnect::socketClosed(KSocket *sock) kSocket=0; socketStatus=KR_INVALID; KEMessage *msg=new KEMessage; - msg->AddData(QCString("ConnectionLost"),(short)QueryID()); + msg->AddData(TQCString("ConnectionLost"),(short)QueryID()); emit signalReceiveMsg(msg,QueryID()); delete msg; } void KRemoteConnect::socketRead(KSocket *sock) { ssize_t buflen; - QString s; + TQString s; char c; int pos; @@ -319,7 +319,7 @@ bool KRemoteConnect::Next() } // Send string to child -bool KRemoteConnect::Send(QString str) +bool KRemoteConnect::Send(TQString str) { // connected? if (!kSocket || kSocket->socket()==-1) return false; |