summaryrefslogtreecommitdiffstats
path: root/knights
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:08:54 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:08:54 -0600
commit35676c0c2e0844ba8429771708c8a04a3314338f (patch)
treec9c226a10fc7b83bf8e7dd35430e6b19aeb85eed /knights
parent05485bbfed57bdeab67bc5683e0dd39901c61a7f (diff)
downloadknights-35676c0c2e0844ba8429771708c8a04a3314338f.tar.gz
knights-35676c0c2e0844ba8429771708c8a04a3314338f.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'knights')
-rw-r--r--knights/audio.cpp6
-rw-r--r--knights/io_internet.cpp10
-rw-r--r--knights/io_internet.h6
-rw-r--r--knights/knights.cpp12
-rw-r--r--knights/pgn.cpp4
-rw-r--r--knights/resource.cpp20
-rw-r--r--knights/tabmanager.h2
7 files changed, 30 insertions, 30 deletions
diff --git a/knights/audio.cpp b/knights/audio.cpp
index ec3825b..b7c9501 100644
--- a/knights/audio.cpp
+++ b/knights/audio.cpp
@@ -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;
diff --git a/knights/io_internet.cpp b/knights/io_internet.cpp
index 5967fca..a3610f1 100644
--- a/knights/io_internet.cpp
+++ b/knights/io_internet.cpp
@@ -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;
diff --git a/knights/io_internet.h b/knights/io_internet.h
index 1af639b..b19a327 100644
--- a/knights/io_internet.h
+++ b/knights/io_internet.h
@@ -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;
diff --git a/knights/knights.cpp b/knights/knights.cpp
index 5cef31c..fb59d80 100644
--- a/knights/knights.cpp
+++ b/knights/knights.cpp
@@ -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
{
diff --git a/knights/pgn.cpp b/knights/pgn.cpp
index c2a827a..7787b3f 100644
--- a/knights/pgn.cpp
+++ b/knights/pgn.cpp
@@ -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 = "";
}
}
diff --git a/knights/resource.cpp b/knights/resource.cpp
index 48d3001..b813723 100644
--- a/knights/resource.cpp
+++ b/knights/resource.cpp
@@ -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();
diff --git a/knights/tabmanager.h b/knights/tabmanager.h
index dec1179..1d6a702 100644
--- a/knights/tabmanager.h
+++ b/knights/tabmanager.h
@@ -56,7 +56,7 @@ class TabManager : public TQObject
private:
TabBoxList myList;
- KConfig *appConfig;
+ TDEConfig *appConfig;
resource *myResource;
};