Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 05485bbfed
commit 35676c0c2e

@ -113,7 +113,7 @@ void audio::setTheme( const TQString &newTheme )
a->audioMap.clear();
a->fileRef.clear();
if( !KIO::NetAccess::download( newTheme + "theme.conf" , configFile ) )
if( !TDEIO::NetAccess::download( newTheme + "theme.conf" , configFile ) )
{
kdWarning() << "audio::setTheme: Can not access theme.conf from " << newTheme << endl;
return;
@ -145,7 +145,7 @@ void audio::setTheme( const TQString &newTheme )
a->firstTime = FALSE;
delete themeConfig;
KIO::NetAccess::removeTempFile( configFile );
TDEIO::NetAccess::removeTempFile( configFile );
}
void audio::prepFile( const TQString &source, const int &ref )
{
@ -159,7 +159,7 @@ void audio::prepFile( const TQString &source, const int &ref )
dest->setAutoDelete( TRUE );
filename = dest->name();
if( !KIO::NetAccess::download( source, filename ) )
if( !TDEIO::NetAccess::download( source, filename ) )
{
kdWarning() << "audio::prepFile: Can not download " << source << endl;
delete dest;

@ -155,7 +155,7 @@ void io_internet::connectToServer()
TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
socket = new KSocket("127.0.0.1", myServer->Port + 1, 30);
socket = new TDESocket("127.0.0.1", myServer->Port + 1, 30);
if(socket->socket() == -1)
{
/* try again on a different port, somehow the port hasn't been freed yet */
@ -173,7 +173,7 @@ void io_internet::connectToServer()
TQApplication::postEvent( tqApp->mainWidget(), new TQCustomEvent( EVENT_Del_IO_Net ) );
return;
}
socket = new KSocket("127.0.0.1", myServer->Port + 2, 30);
socket = new TDESocket("127.0.0.1", myServer->Port + 2, 30);
if(socket->socket() == -1)
{
/* if we can't do it the second time, give up */
@ -187,7 +187,7 @@ void io_internet::connectToServer()
}
else
{
socket = new KSocket(myServer->URL, myServer->Port, 30);
socket = new TDESocket(myServer->URL, myServer->Port, 30);
if(socket->socket() == -1)
{
/* Couldn't connect to server. Notify User and die gracefully */
@ -201,7 +201,7 @@ void io_internet::connectToServer()
socket->enableWrite(true);
/* connect a signal to readReady */
connect(socket, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(readCommand(KSocket *)));
connect(socket, TQT_SIGNAL(readEvent(TDESocket *)), this, TQT_SLOT(readCommand(TDESocket *)));
/* setup the seekTimer and turn it off by default */
seekTimer = new TQTimer(this);
@ -383,7 +383,7 @@ void io_internet::send(const TQString& msg)
// io_internet::readCommand
//
///////////////////////////////////////
void io_internet::readCommand(KSocket* socket)
void io_internet::readCommand(TDESocket* socket)
{
char buffer[READ_BUFFER_SIZE];
TQString tmp;

@ -30,7 +30,7 @@
#include "challenge_graph.h"
#include "tab_seeklist.h"
class KSocket;
class TDESocket;
class TDEProcess;
class resource;
class core;
@ -80,7 +80,7 @@ class io_internet : public io_base
public slots:
virtual void recvCMD(const Command& command);
void readCommand(KSocket *);
void readCommand(TDESocket *);
void sendUserName(void);
void sendPassword(void);
void send(const TQString&);
@ -115,7 +115,7 @@ class io_internet : public io_base
/* These are used for the connection & logon */
TQFile *Log;
KSocket *socket;
TDESocket *socket;
TDEProcess *myTimeseal;
struct serverResource *myServer;
int loginStage;

@ -985,22 +985,22 @@ void Knights::installThemes( void )
for( loop = 0; loop < files.count(); loop++ )
{
/* Try writing to the global theme dir */
if( !KIO::NetAccess::copy( files[loop], KURL( TQString( Resource->themeDir() + files[loop].filename() ) ) ) )
if( !TDEIO::NetAccess::copy( files[loop], KURL( TQString( Resource->themeDir() + files[loop].filename() ) ) ) )
{
/* Nope... Try a local .knights dir */
allerror += "\n\n" + TQString( Resource->themeDir() + files[loop].filename() )
+ " - " + KIO::NetAccess::lastErrorString();
if( !KIO::NetAccess::exists( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) ) )
+ " - " + TDEIO::NetAccess::lastErrorString();
if( !TDEIO::NetAccess::exists( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) ) )
{
/* Create local .knights dir */
KIO::NetAccess::mkdir( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) );
TDEIO::NetAccess::mkdir( KURL( TQString( TQDir::homeDirPath() + "/.knights" ) ) );
}
if( !KIO::NetAccess::copy( files[loop], KURL( TQString( TQDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
if( !TDEIO::NetAccess::copy( files[loop], KURL( TQString( TQDir::homeDirPath() + "/.knights/" + files[loop].filename() ) ) ) )
{
/* Nope, can't copy it anywhere */
installError = TRUE;
allerror += "\n\n" + TQString( TQDir::homeDirPath() + "/.knights/"
+ files[loop].filename() ) + " - " + KIO::NetAccess::lastErrorString();
+ files[loop].filename() ) + " - " + TDEIO::NetAccess::lastErrorString();
}
else
{

@ -723,7 +723,7 @@ TQString pgn::getword( void )
bool pgn::open( const TQString &URL )
{
close();
if( !KIO::NetAccess::download( URL, tempFile ) )
if( !TDEIO::NetAccess::download( URL, tempFile ) )
return FALSE;
File.setName( tempFile );
@ -750,7 +750,7 @@ void pgn::close( void )
}
if( !tempFile.isEmpty() )
{
KIO::NetAccess::removeTempFile( tempFile );
TDEIO::NetAccess::removeTempFile( tempFile );
tempFile = "";
}
}

@ -100,7 +100,7 @@ resource::~resource()
TQStringList temps = TDEGlobal::dirs()->findAllResources("tmp","knights*");
for( int a=0; a < temps.count(); a++)
{
KIO::NetAccess::del( "file://" + temps[a] );
TDEIO::NetAccess::del( "file://" + temps[a] );
} */
}
///////////////////////////////////////
@ -657,11 +657,11 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
}
/* load the theme.conf files */
if( !KIO::NetAccess::download( boardURL + "theme.conf", boardConf ) )
if( !TDEIO::NetAccess::download( boardURL + "theme.conf", boardConf ) )
kdWarning() << "Can not read theme.conf from " << boardURL << endl;
boardConfig = new KSimpleConfig( boardConf, TRUE );
if( !KIO::NetAccess::download( chessmenURL + "theme.conf", chessmenConf ) )
if( !TDEIO::NetAccess::download( chessmenURL + "theme.conf", chessmenConf ) )
kdWarning() << "Can not read theme.conf from " << chessmenURL << endl;
chessmenConfig = new KSimpleConfig( chessmenConf, TRUE );
@ -718,8 +718,8 @@ void resource::setTheme( int BoardIndex, int ChessmenIndex )
/* Remove the theme.conf files */
delete boardConfig;
delete chessmenConfig;
KIO::NetAccess::removeTempFile( boardConf );
KIO::NetAccess::removeTempFile( chessmenConf );
TDEIO::NetAccess::removeTempFile( boardConf );
TDEIO::NetAccess::removeTempFile( chessmenConf );
/* Cleanup */
pixCache->clear();
@ -737,11 +737,11 @@ void resource::loadThemeItem( const TQString &URL, TQImage &Image )
{
TQString tempFile;
if( KIO::NetAccess::download( URL, tempFile ) )
if( TDEIO::NetAccess::download( URL, tempFile ) )
{
if( !Image.load( tempFile ) )
kdError() << "resource::LoadThemeItem: Can not load " << tempFile << ", which comes from " << URL << endl;
KIO::NetAccess::removeTempFile( tempFile );
TDEIO::NetAccess::removeTempFile( tempFile );
}
else
kdError() << "resource::LoadThemeItem: Can not extract " << URL << endl;
@ -964,13 +964,13 @@ TQString resource::themeURL( const TQString theme )
{
TQString fullURL;
fullURL = "tar:" + GlobalDataDir + "themes/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
if( !TDEIO::NetAccess::exists( fullURL ) )
{
fullURL = "tar:" + TQDir::currentDirPath() + "../media/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
if( !TDEIO::NetAccess::exists( fullURL ) )
{
fullURL = "tar:" + TQDir::homeDirPath() + "/.knights/" + theme;
if( !KIO::NetAccess::exists( fullURL ) )
if( !TDEIO::NetAccess::exists( fullURL ) )
{
kdWarning() << "The theme " << theme << " does not exist in any valid path." << endl;
return TQString();

@ -56,7 +56,7 @@ class TabManager : public TQObject
private:
TabBoxList myList;
KConfig *appConfig;
TDEConfig *appConfig;
resource *myResource;
};

Loading…
Cancel
Save