Browse Source

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

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
05485bbfed

+ 1
- 1
History View File

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

+ 7
- 7
knights/io_engine.cpp View File

@@ -77,7 +77,7 @@ void io_engine::Start( const int side )
77 77
 	/* Stop accidents */
78 78
 	if( engine != NULL )
79 79
 		return;
80
-	engine = new KProcess();
80
+	engine = new TDEProcess();
81 81
 
82 82
 	/* Convert 'side' to 'ID' */
83 83
 	if( side == WHITE )
@@ -151,14 +151,14 @@ void io_engine::Start( const int side )
151 151
 	}
152 152
 
153 153
 	/* Showtime */
154
-	if( !engine->start( KProcess::NotifyOnExit, KProcess::All ) )
154
+	if( !engine->start( TDEProcess::NotifyOnExit, TDEProcess::All ) )
155 155
 	{
156 156
 		kdError() << "io_engine::Start: Can not run the engine: " << (*IT).Filename << endl;
157 157
 		return;
158 158
 	}
159
-	connect( engine, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( SendClear( KProcess* ) ) );
160
-	connect( engine, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) );
161
-	connect( engine, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), this, TQT_SLOT( Recv( KProcess*, char*, int ) ) );
159
+	connect( engine, TQT_SIGNAL( wroteStdin( TDEProcess* ) ), this, TQT_SLOT( SendClear( TDEProcess* ) ) );
160
+	connect( engine, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
161
+	connect( engine, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), this, TQT_SLOT( Recv( TDEProcess*, char*, int ) ) );
162 162
 
163 163
 	proto->parse( Command( myID, CMD_Init ) );
164 164
 
@@ -223,7 +223,7 @@ void io_engine::sendToChild( void )
223 223
 //	io_engine::Recv
224 224
 //
225 225
 ///////////////////////////////////////
226
-void io_engine::Recv( KProcess*, char *buffer, int bufLen )
226
+void io_engine::Recv( TDEProcess*, char *buffer, int bufLen )
227 227
 {
228 228
 	char *newBuff = new char[bufLen + 1];
229 229
 	strncpy( newBuff, buffer, bufLen );
@@ -303,7 +303,7 @@ void io_engine::recvProtoCMD( const Command &command )
303 303
  }
304 304
 }
305 305
 
306
-void io_engine::SendClear( KProcess* )
306
+void io_engine::SendClear( TDEProcess* )
307 307
 {
308 308
 	SafeToSend = TRUE;
309 309
 	if( !FIFO_Out.isEmpty() )

+ 4
- 4
knights/io_engine.h View File

@@ -27,7 +27,7 @@
27 27
   */
28 28
 
29 29
 class TQFile;
30
-class KProcess;
30
+class TDEProcess;
31 31
 class resource;
32 32
 class proto_base;
33 33
 
@@ -44,8 +44,8 @@ class io_engine : public io_base
44 44
 	public slots:
45 45
 		virtual void					recvCMD( const Command& command );
46 46
 		void									recvProtoCMD( const Command& command );
47
-		void									SendClear( KProcess* );
48
-		void									Recv( KProcess*, char*, int );
47
+		void									SendClear( TDEProcess* );
48
+		void									Recv( TDEProcess*, char*, int );
49 49
 
50 50
 	signals:
51 51
 		virtual void					sendCMD(const Command& command);
@@ -74,7 +74,7 @@ class io_engine : public io_base
74 74
 		ChessMove							Move;
75 75
 
76 76
 		/* Data */
77
-		KProcess							*engine;
77
+		TDEProcess							*engine;
78 78
 		TQString								FIFO_In;
79 79
 		TQString								FIFO_Out;
80 80
 };

+ 2
- 2
knights/io_internet.cpp View File

@@ -144,7 +144,7 @@ void io_internet::connectToServer()
144 144
 
145 145
   if(!myServer->Timeseal.isEmpty())
146 146
   {
147
-    myTimeseal = new KProcess();
147
+    myTimeseal = new TDEProcess();
148 148
     (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
149 149
                   << TQString( "-p" ) << TQString().setNum(myServer->Port + 1);
150 150
     if(!myTimeseal->start())
@@ -162,7 +162,7 @@ void io_internet::connectToServer()
162 162
       delete socket;
163 163
       myTimeseal->kill();
164 164
 
165
-      myTimeseal = new KProcess();
165
+      myTimeseal = new TDEProcess();
166 166
       (*myTimeseal) << myServer->Timeseal << myServer->URL << TQString().setNum( myServer->Port )
167 167
                     << TQString( "-p" ) << TQString().setNum(myServer->Port + 2);
168 168
       if(!myTimeseal->start())                                              

+ 2
- 2
knights/io_internet.h View File

@@ -31,7 +31,7 @@
31 31
 #include "tab_seeklist.h"
32 32
 
33 33
 class KSocket;
34
-class KProcess;
34
+class TDEProcess;
35 35
 class resource;
36 36
 class core;
37 37
 class dlg_login;
@@ -116,7 +116,7 @@ class io_internet : public io_base
116 116
     /* These are used for the connection & logon */
117 117
     TQFile                     *Log;
118 118
     KSocket                   *socket;
119
-    KProcess                  *myTimeseal;
119
+    TDEProcess                  *myTimeseal;
120 120
     struct serverResource     *myServer;
121 121
     int                       loginStage;
122 122
     unsigned int              parseMode;

+ 3
- 3
knights/resource.cpp View File

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

+ 6
- 6
knights/setpagedisplay.cpp View File

@@ -239,12 +239,12 @@ void setPageDisplay::initTab2( void )
239 239
 ///////////////////////////////////////
240 240
 void setPageDisplay::slot_setDefault(void)
241 241
 {
242
-	Resource->FONT_Standard = KGlobalSettings::fixedFont();
243
-	Resource->FONT_PrivateTell = KGlobalSettings::fixedFont();
244
-	Resource->FONT_ChannelTell = KGlobalSettings::fixedFont();
245
-	Resource->FONT_Shout = KGlobalSettings::fixedFont();
246
-	Resource->FONT_Whisper = KGlobalSettings::fixedFont();
247
-	Resource->FONT_Notification = KGlobalSettings::fixedFont();
242
+	Resource->FONT_Standard = TDEGlobalSettings::fixedFont();
243
+	Resource->FONT_PrivateTell = TDEGlobalSettings::fixedFont();
244
+	Resource->FONT_ChannelTell = TDEGlobalSettings::fixedFont();
245
+	Resource->FONT_Shout = TDEGlobalSettings::fixedFont();
246
+	Resource->FONT_Whisper = TDEGlobalSettings::fixedFont();
247
+	Resource->FONT_Notification = TDEGlobalSettings::fixedFont();
248 248
 	Resource->COLOR_Background = Resource->COLOR_White;
249 249
 	Resource->COLOR_Standard = Resource->COLOR_Black;
250 250
 	Resource->COLOR_PrivateTell = TQColor( 128, 0, 128 );	// Purple

+ 2
- 2
knights/wiz_setup.cpp View File

@@ -301,7 +301,7 @@ void wiz_setup::findEngines( void )
301 301
 {
302 302
 	engineResource *newEngine;
303 303
 	TQStringList names, filenames;
304
-	KProcess *Shell;
304
+	TDEProcess *Shell;
305 305
 	bool foundOne( FALSE );
306 306
 	unsigned int loop;
307 307
 
@@ -314,7 +314,7 @@ void wiz_setup::findEngines( void )
314 314
 
315 315
 	for( loop = 0; loop < filenames.count(); loop++ )
316 316
 	{
317
-		Shell = new KProcess();
317
+		Shell = new TDEProcess();
318 318
 		(*Shell) << filenames[loop];
319 319
 		if( Shell->start() )
320 320
 		{

Loading…
Cancel
Save