summaryrefslogtreecommitdiffstats
path: root/libkdegames/kgame/kmessageio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames/kgame/kmessageio.cpp')
-rw-r--r--libkdegames/kgame/kmessageio.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/libkdegames/kgame/kmessageio.cpp b/libkdegames/kgame/kmessageio.cpp
index 7057a621..ec33b159 100644
--- a/libkdegames/kgame/kmessageio.cpp
+++ b/libkdegames/kgame/kmessageio.cpp
@@ -29,54 +29,54 @@
// ----------------------- KMessageIO -------------------------
-KMessageIO::KMessageIO (TQObject *parent, const char *name)
- : TQObject (parent, name), m_id (0)
+KMessageIO::KMessageIO (TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name), m_id (0)
{}
KMessageIO::~KMessageIO ()
{}
-void KMessageIO::setId (Q_UINT32 id)
+void KMessageIO::setId (TQ_UINT32 id)
{
m_id = id;
}
-Q_UINT32 KMessageIO::id ()
+TQ_UINT32 KMessageIO::id ()
{
return m_id;
}
// ----------------------KMessageSocket -----------------------
-KMessageSocket::KMessageSocket (TQString host, Q_UINT16 port, TQObject *parent,
+KMessageSocket::KMessageSocket (TQString host, TQ_UINT16 port, TQObject *tqparent,
const char *name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->connectToHost (host, port);
initSocket ();
}
-KMessageSocket::KMessageSocket (TQHostAddress host, Q_UINT16 port, TQObject
-*parent, const char *name)
- : KMessageIO (parent, name)
+KMessageSocket::KMessageSocket (TQHostAddress host, TQ_UINT16 port, TQObject
+*tqparent, const char *name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->connectToHost (host.toString(), port);
initSocket ();
}
-KMessageSocket::KMessageSocket (TQSocket *socket, TQObject *parent, const char
+KMessageSocket::KMessageSocket (TQSocket *socket, TQObject *tqparent, const char
*name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = socket;
initSocket ();
}
-KMessageSocket::KMessageSocket (int socketFD, TQObject *parent, const char
+KMessageSocket::KMessageSocket (int socketFD, TQObject *tqparent, const char
*name)
- : KMessageIO (parent, name)
+ : KMessageIO (tqparent, name)
{
mSocket = new TQSocket ();
mSocket->setSocket (socketFD);
@@ -96,8 +96,8 @@ bool KMessageSocket::isConnected () const
void KMessageSocket::send (const TQByteArray &msg)
{
TQDataStream str (mSocket);
- str << Q_UINT8 ('M'); // magic number for begin of message
- str.writeBytes (msg.data(), msg.size()); // writes the length (as Q_UINT32) and the data
+ str << TQ_UINT8 ('M'); // magic number for begin of message
+ str.writeBytes (msg.data(), msg.size()); // writes the length (as TQ_UINT32) and the data
}
void KMessageSocket::processNewData ()
@@ -121,7 +121,7 @@ void KMessageSocket::processNewData ()
// Read the magic number first. If something unexpected is found,
// start over again, ignoring the data that was read up to then.
- Q_UINT8 v;
+ TQ_UINT8 v;
str >> v;
if (v != 'M')
{
@@ -135,7 +135,7 @@ void KMessageSocket::processNewData ()
else
{
// Data not completely read => wait for more
- if (mSocket->bytesAvailable() < (Q_ULONG) mNextBlockLength)
+ if (mSocket->bytesAvailable() < (TQ_ULONG) mNextBlockLength)
{
isRecursive = false;
return;
@@ -165,7 +165,7 @@ void KMessageSocket::initSocket ()
isRecursive = false;
}
-Q_UINT16 KMessageSocket::peerPort () const
+TQ_UINT16 KMessageSocket::peerPort () const
{
return mSocket->peerPort();
}
@@ -177,9 +177,9 @@ TQString KMessageSocket::peerName () const
// ----------------------KMessageDirect -----------------------
-KMessageDirect::KMessageDirect (KMessageDirect *partner, TQObject *parent,
+KMessageDirect::KMessageDirect (KMessageDirect *partner, TQObject *tqparent,
const char *name)
- : KMessageIO (parent, name), mPartner (0)
+ : KMessageIO (tqparent, name), mPartner (0)
{
// 0 as first parameter leaves the object unconnected
if (!partner)
@@ -238,14 +238,14 @@ KMessageProcess::~KMessageProcess()
// Maybe todo: delete mSendBuffer
}
}
-KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(parent,0)
+KMessageProcess::KMessageProcess(TQObject *tqparent, TQString file) : KMessageIO(tqparent,0)
{
// Start process
kdDebug(11001) << "@@@KMessageProcess::Start process" << endl;
mProcessName=file;
mProcess=new KProcess;
int id=0;
- *mProcess << mProcessName << TQString("%1").arg(id);
+ *mProcess << mProcessName << TQString("%1").tqarg(id);
kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl;
kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl;
connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
@@ -397,7 +397,7 @@ void KMessageProcess::slotProcessExited(KProcess * /*p*/)
// ----------------------- KMessageFilePipe ---------------------------
-KMessageFilePipe::KMessageFilePipe(TQObject *parent,TQFile *readfile,TQFile *writefile) : KMessageIO(parent,0)
+KMessageFilePipe::KMessageFilePipe(TQObject *tqparent,TQFile *readfile,TQFile *writefile) : KMessageIO(tqparent,0)
{
mReadFile=readfile;
mWriteFile=writefile;
@@ -430,7 +430,7 @@ void KMessageFilePipe::send(const TQByteArray &msg)
mWriteFile->writeBlock(buffer);
mWriteFile->flush();
/*
- fprintf(stderr,"+++ KMessageFilePipe:: SEND(%d to parent) realsize=%d\n",msg.size(),buffer.size());
+ fprintf(stderr,"+++ KMessageFilePipe:: SEND(%d to tqparent) realsize=%d\n",msg.size(),buffer.size());
for (int i=0;i<buffer.size();i++) fprintf(stderr,"%02x ",buffer[i]);fprintf(stderr,"\n");
fflush(stderr);
*/