diff options
Diffstat (limited to 'knights/io_engine.cpp')
-rw-r--r-- | knights/io_engine.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/knights/io_engine.cpp b/knights/io_engine.cpp index d9a15a7..5f44b1e 100644 --- a/knights/io_engine.cpp +++ b/knights/io_engine.cpp @@ -18,8 +18,8 @@ #include <kprocess.h> #include <kicontheme.h> -#include <qregexp.h> -#include <qfile.h> +#include <tqregexp.h> +#include <tqfile.h> #include <stdlib.h> #include <stdio.h> @@ -31,7 +31,7 @@ #include "proto_xboard.h" #include "proto_uci.h" -io_engine::io_engine( QWidget *parent, resource *Rsrc ) : io_base( parent, Rsrc ) +io_engine::io_engine( TQWidget *tqparent, resource *Rsrc ) : io_base( tqparent, Rsrc ) { myType = io_base::LOCAL; engine = NULL; @@ -69,7 +69,7 @@ io_engine::~io_engine() /////////////////////////////////////// void io_engine::Start( const int side ) { - QStringList args; + TQStringList args; unsigned int tmp; int ID; bool Army; @@ -125,8 +125,8 @@ void io_engine::Start( const int side ) proto = new proto_xboard( myID ); break; } - connect( proto, SIGNAL( output( const QString& ) ), this, SLOT( WriteFIFO( const QString& ) ) ); - connect( proto, SIGNAL( output( const Command& ) ), this, SLOT( recvProtoCMD( const Command& ) ) ); + connect( proto, TQT_SIGNAL( output( const TQString& ) ), this, TQT_SLOT( WriteFIFO( const TQString& ) ) ); + connect( proto, TQT_SIGNAL( output( const Command& ) ), this, TQT_SLOT( recvProtoCMD( const Command& ) ) ); /* ...engine's display name */ proto->parse( Command( myID, CMD_Set_Name, (*IT).Name ) ); @@ -135,7 +135,7 @@ void io_engine::Start( const int side ) (*engine) << (*IT).Filename; /* ...command line arguments */ - args = QStringList::split( QString(" "), (*IT).Arguments, FALSE ); + args = TQStringList::split( TQString(" "), (*IT).Arguments, FALSE ); for( tmp = 0; tmp < args.count(); tmp++ ) { (*engine) << args[tmp]; @@ -144,7 +144,7 @@ void io_engine::Start( const int side ) /* ...log file */ if( !(*IT).LogFile.isEmpty() ) { - Log = new QFile( (*IT).LogFile ); + Log = new TQFile( (*IT).LogFile ); if( !Log->open( IO_WriteOnly | IO_Append ) ) if( !Log->open( IO_WriteOnly ) ) kdError() << "io_engine::Start: Can not open " << (*IT).LogFile << " for writing." << endl; @@ -156,9 +156,9 @@ void io_engine::Start( const int side ) kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl; return; } - connect( engine, SIGNAL( wroteStdin( KProcess* ) ), this, SLOT( SendClear( KProcess* ) ) ); - connect( engine, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) ); - connect( engine, SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, SLOT( Recv( KProcess*, char*, int ) ) ); + connect( engine, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( SendClear( KProcess* ) ) ); + connect( engine, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) ); + connect( engine, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) ); proto->parse( Command( myID, CMD_Init ) ); @@ -231,19 +231,19 @@ void io_engine::Recv( KProcess*, char *buffer, int bufLen ) FIFO_In += newBuff; delete newBuff; - if( FIFO_In.contains( QChar('\n') ) ) + if( FIFO_In.tqcontains( TQChar('\n') ) ) { - QString proc = FIFO_In.left( FIFO_In.findRev( QChar('\n') ) ); + TQString proc = FIFO_In.left( FIFO_In.tqfindRev( TQChar('\n') ) ); FIFO_In = FIFO_In.right( FIFO_In.length() - proc.length() ); /* Split and Parse Full Lines of Input */ - QStringList strList = QStringList::split( "\n", proc ); + TQStringList strList = TQStringList::split( "\n", proc ); for( unsigned int loop = 0; loop < strList.count(); loop++ ) { /* Print the input to the log file */ if( Log ) { - QString data = "-> " + strList[loop] + "\n"; + TQString data = "-> " + strList[loop] + "\n"; Log->writeBlock( data.latin1(), data.length() ); } proto->parse( strList[loop] ); @@ -256,9 +256,9 @@ void io_engine::Recv( KProcess*, char *buffer, int bufLen ) // io_engine::WriteFIFO // /////////////////////////////////////// -void io_engine::WriteFIFO( const QString &Data ) +void io_engine::WriteFIFO( const TQString &Data ) { - QString data = Data; + TQString data = Data; if( data.isEmpty() ) return; if( data.right(1) != "\n" ) |