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 /libkdegames/kgame/kgameprocess.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 'libkdegames/kgame/kgameprocess.cpp')
-rw-r--r-- | libkdegames/kgame/kgameprocess.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libkdegames/kgame/kgameprocess.cpp b/libkdegames/kgame/kgameprocess.cpp index 96efe0ce..ffbf0936 100644 --- a/libkdegames/kgame/kgameprocess.cpp +++ b/libkdegames/kgame/kgameprocess.cpp @@ -29,9 +29,9 @@ #include <krandomsequence.h> -#include <qbuffer.h> -#include <qdatastream.h> -#include <qcstring.h> +#include <tqbuffer.h> +#include <tqdatastream.h> +#include <tqcstring.h> #include <assert.h> #include <stdio.h> @@ -43,7 +43,7 @@ // ----------------------- Process Child --------------------------- -KGameProcess::KGameProcess() : QObject(0,0) +KGameProcess::KGameProcess() : TQObject(0,0) { mTerminate=false; // Check whether a player is set. If not create one! @@ -52,10 +52,10 @@ KGameProcess::KGameProcess() : QObject(0,0) mMessageIO=new KMessageFilePipe(this,&rFile,&wFile); // mMessageClient=new KMessageClient(this); // mMessageClient->setServer(mMessageIO); -// connect (mMessageClient, SIGNAL(broadcastReceived(const QByteArray&, Q_UINT32)), -// this, SLOT(receivedMessage(const QByteArray&, Q_UINT32))); - connect (mMessageIO, SIGNAL(received(const QByteArray&)), - this, SLOT(receivedMessage(const QByteArray&))); +// connect (mMessageClient, TQT_SIGNAL(broadcastReceived(const TQByteArray&, Q_UINT32)), +// this, TQT_SLOT(receivedMessage(const TQByteArray&, Q_UINT32))); + connect (mMessageIO, TQT_SIGNAL(received(const TQByteArray&)), + this, TQT_SLOT(receivedMessage(const TQByteArray&))); fprintf(stderr,"KGameProcess::constructor %p %p\n",&rFile,&wFile); mRandom = new KRandomSequence; @@ -85,17 +85,17 @@ bool KGameProcess::exec(int argc, char *argv[]) } // You have to do this to create a message -// QByteArray buffer; -// QDataStream wstream(buffer,IO_WriteOnly); +// TQByteArray buffer; +// TQDataStream wstream(buffer,IO_WriteOnly); // then stream data into the stream and call this function -void KGameProcess::sendSystemMessage(QDataStream &stream,int msgid,Q_UINT32 receiver) +void KGameProcess::sendSystemMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver) { fprintf(stderr,"KGameProcess::sendMessage id=%d recv=%d",msgid,receiver); - QByteArray a; - QDataStream outstream(a,IO_WriteOnly); + TQByteArray a; + TQDataStream outstream(a,IO_WriteOnly); - QBuffer *device=(QBuffer *)stream.device(); - QByteArray data=device->buffer();; + TQBuffer *device=(TQBuffer *)stream.device(); + TQByteArray data=device->buffer();; KGameMessage::createHeader(outstream,0,receiver,msgid); outstream.writeRawBytes(data.data(),data.size()); @@ -107,7 +107,7 @@ void KGameProcess::sendSystemMessage(QDataStream &stream,int msgid,Q_UINT32 rece if (mMessageIO) mMessageIO->send(a); } -void KGameProcess::sendMessage(QDataStream &stream,int msgid,Q_UINT32 receiver) +void KGameProcess::sendMessage(TQDataStream &stream,int msgid,Q_UINT32 receiver) { sendSystemMessage(stream,msgid+KGameMessage::IdUser,receiver); } @@ -129,9 +129,9 @@ void KGameProcess::processArgs(int argc, char *argv[]) fflush(stderr); } -void KGameProcess::receivedMessage(const QByteArray& receiveBuffer) +void KGameProcess::receivedMessage(const TQByteArray& receiveBuffer) { - QDataStream stream(receiveBuffer, IO_ReadOnly); + TQDataStream stream(receiveBuffer, IO_ReadOnly); int msgid; Q_UINT32 sender; Q_UINT32 receiver; |