Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 9d83c0d78f
commit 05485bbfed

@ -86,7 +86,7 @@ Troy Corbin Jr. <tcorbin@users.sourceforge.net>
- Fixed the time read from saved, unfinished PGN games. - Fixed the time read from saved, unfinished PGN games.
* Moved the "Seconds Between Seek Updates" and "Auto Close Last ICS" options * Moved the "Seconds Between Seek Updates" and "Auto Close Last ICS" options
from the General Settings to the Server Options tab. from the General Settings to the Server Options tab.
- Rewrote the engine communications code to use KDE's KProcess instead of UNIX - Rewrote the engine communications code to use KDE's TDEProcess instead of UNIX
pipes and signals. This should make Knights more portable, and should fix pipes and signals. This should make Knights more portable, and should fix
some obscure errors. some obscure errors.
* Applied KDE3 compatability patch from Harald Fernengel * Applied KDE3 compatability patch from Harald Fernengel

@ -77,7 +77,7 @@ void io_engine::Start( const int side )
/* Stop accidents */ /* Stop accidents */
if( engine != NULL ) if( engine != NULL )
return; return;
engine = new KProcess(); engine = new TDEProcess();
/* Convert 'side' to 'ID' */ /* Convert 'side' to 'ID' */
if( side == WHITE ) if( side == WHITE )
@ -151,14 +151,14 @@ void io_engine::Start( const int side )
} }
/* Showtime */ /* Showtime */
if( !engine->start( KProcess::NotifyOnExit, KProcess::All ) ) if( !engine->start( TDEProcess::NotifyOnExit, TDEProcess::All ) )
{ {
kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl; kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl;
return; return;
} }
connect( engine, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( SendClear( KProcess* ) ) ); connect( engine, TQT_SIGNAL( wroteStdin( TDEProcess* ) ), this, TQT_SLOT( SendClear( TDEProcess* ) ) );
connect( engine, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) ); connect( engine, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
connect( engine, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) ); connect( engine, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
proto->parse( Command( myID, CMD_Init ) ); proto->parse( Command( myID, CMD_Init ) );
@ -223,7 +223,7 @@ void io_engine::sendToChild( void )
// io_engine::Recv // io_engine::Recv
// //
/////////////////////////////////////// ///////////////////////////////////////
void io_engine::Recv( KProcess*, char *buffer, int bufLen ) void io_engine::Recv( TDEProcess*, char *buffer, int bufLen )
{ {
char *newBuff = new char[bufLen + 1]; char *newBuff = new char[bufLen + 1];
strncpy( newBuff, buffer, bufLen ); strncpy( newBuff, buffer, bufLen );
@ -303,7 +303,7 @@ void io_engine::recvProtoCMD( const Command &command )
} }
} }
void io_engine::SendClear( KProcess* ) void io_engine::SendClear( TDEProcess* )
{ {
SafeToSend = TRUE; SafeToSend = TRUE;
if( !FIFO_Out.isEmpty() ) if( !FIFO_Out.isEmpty() )

@ -27,7 +27,7 @@
*/ */
class TQFile; class TQFile;
class KProcess; class TDEProcess;
class resource; class resource;
class proto_base; class proto_base;
@ -44,8 +44,8 @@ class io_engine : public io_base
public slots: public slots:
virtual void recvCMD( const Command& command ); virtual void recvCMD( const Command& command );
void recvProtoCMD( const Command& command ); void recvProtoCMD( const Command& command );
void SendClear( KProcess* ); void SendClear( TDEProcess* );
void Recv( KProcess*, char*, int ); void Recv( TDEProcess*, char*, int );
signals: signals:
virtual void sendCMD(const Command& command); virtual void sendCMD(const Command& command);
@ -74,7 +74,7 @@ class io_engine : public io_base
ChessMove Move; ChessMove Move;
/* Data */ /* Data */
KProcess *engine; TDEProcess *engine;
TQString FIFO_In; TQString FIFO_In;
TQString FIFO_Out; TQString FIFO_Out;
}; };

@ -144,7 +144,7 @@ void io_internet::connectToServer()
if(!myServer->Timeseal.isEmpty()) if(!myServer->Timeseal.isEmpty())
{ {
myTimeseal = new KProcess(); myTimeseal = new TDEProcess();
(*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port ) (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
<< TQString( "-p" ) << TQString().setNum(myServer->Port + 1); << TQString( "-p" ) << TQString().setNum(myServer->Port + 1);
if(!myTimeseal->start()) if(!myTimeseal->start())
@ -162,7 +162,7 @@ void io_internet::connectToServer()
delete socket; delete socket;
myTimeseal->kill(); myTimeseal->kill();
myTimeseal = new KProcess(); myTimeseal = new TDEProcess();
(*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port ) (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
<< TQString( "-p" ) << TQString().setNum(myServer->Port + 2); << TQString( "-p" ) << TQString().setNum(myServer->Port + 2);
if(!myTimeseal->start()) if(!myTimeseal->start())

@ -31,7 +31,7 @@
#include "tab_seeklist.h" #include "tab_seeklist.h"
class KSocket; class KSocket;
class KProcess; class TDEProcess;
class resource; class resource;
class core; class core;
class dlg_login; class dlg_login;
@ -116,7 +116,7 @@ class io_internet : public io_base
/* These are used for the connection & logon */ /* These are used for the connection & logon */
TQFile *Log; TQFile *Log;
KSocket *socket; KSocket *socket;
KProcess *myTimeseal; TDEProcess *myTimeseal;
struct serverResource *myServer; struct serverResource *myServer;
int loginStage; int loginStage;
unsigned int parseMode; unsigned int parseMode;

@ -64,7 +64,7 @@ resource::resource(TDECmdLineArgs *args)
/* Define GlobalDataDir... This is very important! */ /* Define GlobalDataDir... This is very important! */
GlobalDataDir = args->getOption( "d" ); GlobalDataDir = args->getOption( "d" );
if( GlobalDataDir.isEmpty() ) if( GlobalDataDir.isEmpty() )
GlobalDataDir = KGlobal::dirs()->findResourceDir("data", "knights/splash.png") + "knights/"; GlobalDataDir = TDEGlobal::dirs()->findResourceDir("data", "knights/splash.png") + "knights/";
if( GlobalDataDir.isEmpty() ) if( GlobalDataDir.isEmpty() )
{ {
kdWarning() << "resource::resource: Can not read GlobalDataDir from environment." << endl; kdWarning() << "resource::resource: Can not read GlobalDataDir from environment." << endl;
@ -97,7 +97,7 @@ resource::~resource()
delete myAccel; delete myAccel;
/* Remove temp files that we missed /* Remove temp files that we missed
TQStringList temps = KGlobal::dirs()->findAllResources("tmp","knights*"); TQStringList temps = TDEGlobal::dirs()->findAllResources("tmp","knights*");
for( int a=0; a < temps.count(); a++) for( int a=0; a < temps.count(); a++)
{ {
KIO::NetAccess::del( "file://" + temps[a] ); KIO::NetAccess::del( "file://" + temps[a] );
@ -869,7 +869,7 @@ void resource::WriteColors( void )
/////////////////////////////////////// ///////////////////////////////////////
void resource::ReadFonts( void ) void resource::ReadFonts( void )
{ {
TQFont Fixed = KGlobalSettings::fixedFont(); TQFont Fixed = TDEGlobalSettings::fixedFont();
CFG->setGroup( "Fonts" ); CFG->setGroup( "Fonts" );
FONT_Standard = CFG->readFontEntry( "StandardFont", &Fixed ); FONT_Standard = CFG->readFontEntry( "StandardFont", &Fixed );
FONT_PrivateTell = CFG->readFontEntry( "PrivateFont", &Fixed ); FONT_PrivateTell = CFG->readFontEntry( "PrivateFont", &Fixed );

@ -239,12 +239,12 @@ void setPageDisplay::initTab2( void )
/////////////////////////////////////// ///////////////////////////////////////
void setPageDisplay::slot_setDefault(void) void setPageDisplay::slot_setDefault(void)
{ {
Resource->FONT_Standard = KGlobalSettings::fixedFont(); Resource->FONT_Standard = TDEGlobalSettings::fixedFont();
Resource->FONT_PrivateTell = KGlobalSettings::fixedFont(); Resource->FONT_PrivateTell = TDEGlobalSettings::fixedFont();
Resource->FONT_ChannelTell = KGlobalSettings::fixedFont(); Resource->FONT_ChannelTell = TDEGlobalSettings::fixedFont();
Resource->FONT_Shout = KGlobalSettings::fixedFont(); Resource->FONT_Shout = TDEGlobalSettings::fixedFont();
Resource->FONT_Whisper = KGlobalSettings::fixedFont(); Resource->FONT_Whisper = TDEGlobalSettings::fixedFont();
Resource->FONT_Notification = KGlobalSettings::fixedFont(); Resource->FONT_Notification = TDEGlobalSettings::fixedFont();
Resource->COLOR_Background = Resource->COLOR_White; Resource->COLOR_Background = Resource->COLOR_White;
Resource->COLOR_Standard = Resource->COLOR_Black; Resource->COLOR_Standard = Resource->COLOR_Black;
Resource->COLOR_PrivateTell = TQColor( 128, 0, 128 ); // Purple Resource->COLOR_PrivateTell = TQColor( 128, 0, 128 ); // Purple

@ -301,7 +301,7 @@ void wiz_setup::findEngines( void )
{ {
engineResource *newEngine; engineResource *newEngine;
TQStringList names, filenames; TQStringList names, filenames;
KProcess *Shell; TDEProcess *Shell;
bool foundOne( FALSE ); bool foundOne( FALSE );
unsigned int loop; unsigned int loop;
@ -314,7 +314,7 @@ void wiz_setup::findEngines( void )
for( loop = 0; loop < filenames.count(); loop++ ) for( loop = 0; loop < filenames.count(); loop++ )
{ {
Shell = new KProcess(); Shell = new TDEProcess();
(*Shell) << filenames[loop]; (*Shell) << filenames[loop];
if( Shell->start() ) if( Shell->start() )
{ {

Loading…
Cancel
Save