[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs]
From:       kde () office ! kde ! org
Date:       2004-10-07 14:41:56
Message-ID: 416555B4.mailOE411KCLU () office ! kde ! org
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/kio_atlantik
In directory office:/tmp/cvs-serv31535/kio_atlantik

Modified Files:
      Tag: KDE_3_3_BRANCH
	kio_atlantik.cpp 
Log Message:
New-patches: rob@unixcode.org--2004/atlantik--mainline--0.8--patch-39..40
Summary: kio_atlantik fixes

Backport of invitation fixes.


Index: kio_atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/kio_atlantik/kio_atlantik.cpp,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- kio_atlantik.cpp	28 May 2004 17:39:17 -0000	1.7
+++ kio_atlantik.cpp	7 Oct 2004 14:41:54 -0000	1.7.2.1
@@ -15,11 +15,9 @@
 // Boston, MA 02111-1307, USA.
 
 #include <stdlib.h>
+
 #include <qtextstream.h>
 
-#include <kio/slavebase.h>
-#include <kinstance.h>
-#include <kdebug.h>
 #include <kdeversion.h>
 #undef KDE_3_1_FEATURES
 #ifdef KDE_MAKE_VERSION
@@ -27,6 +25,8 @@
 #define KDE_3_1_FEATURES
 #endif
 #endif
+#include <kio/slavebase.h>
+#include <kinstance.h>
 #include <kprocess.h>
 
 #include "kio_atlantik.h"
@@ -48,20 +48,19 @@
 	*proc << "atlantik";
 
 #ifdef KDE_3_1_FEATURES
-	QString host = KProcess::quote(url.queryItem("host"));
-	QString port = KProcess::quote(url.queryItem("port"));
-	QString game = KProcess::quote(url.queryItem("game"));
+	QString host = url.hasHost() ? url.host() : KProcess::quote( url.queryItem("host") );
 #else
-	QString host = url.queryItem("host"));
-	QString port = url.queryItem("port"));
-	QString game = url.queryItem("game"));
+	QString host = url.hasHost() ? url.host() : url.queryItem("host");
 #endif
+	QString port = QString::number( url.port() ? url.port() : 1234 );
+	int game = url.queryItem("game").toInt();
+	QString gameString = game ? QString::number( game ) : QString::null;
 
 	if (!host.isNull() && !port.isNull())
 	{
 		*proc << "--host" << host << "--port" << port;
-		if (!game.isNull())
-			*proc << "--game" << game;
+		if (!gameString.isNull())
+			*proc << "--game" << gameString;
 	}
 
 	proc->start(KProcess::DontCare);

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic