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.
* Moved the "Seconds Between Seek Updates" and "Auto Close Last ICS" options
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
some obscure errors.
* Applied KDE3 compatability patch from Harald Fernengel

@ -77,7 +77,7 @@ void io_engine::Start( const int side )
/* Stop accidents */
if( engine != NULL )
return;
engine = new KProcess();
engine = new TDEProcess();
/* Convert 'side' to 'ID' */
if( side == WHITE )
@ -151,14 +151,14 @@ void io_engine::Start( const int side )
}
/* 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;
return;
}
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 ) ) );
connect( engine, TQT_SIGNAL( wroteStdin( TDEProcess* ) ), this, TQT_SLOT( SendClear( TDEProcess* ) ) );
connect( engine, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
connect( engine, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
proto->parse( Command( myID, CMD_Init ) );
@ -223,7 +223,7 @@ void io_engine::sendToChild( void )
// 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];
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;
if( !FIFO_Out.isEmpty() )

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

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

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

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

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

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

Loading…
Cancel
Save