[atlantik-cvs] CVS: kdegames/atlantik/kio_atlantik kio_atlantik.cpp, 1.8, 1.9
[email protected] Thu, 07 Oct 2004 16:37:05 +0200
| Newsgroups | gmane.comp.kde.devel.atlantik |
|---|---|
| Message-ID | <[email protected]> |
Update of /home/kde/kdegames/atlantik/kio_atlantik In directory office:/tmp/cvs-serv31370/kio_atlantik Modified Files: kio_atlantik.cpp Log Message: New-patches: [email protected]/atlantik--mainline--0.8--patch-40 Summary: kio_atlantik fixes Keywords: Atlantik won't properly start with a quoted hostname. Index: kio_atlantik.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/kio_atlantik/kio_atlantik.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- kio_atlantik.cpp 7 Oct 2004 13:53:52 -0000 1.8 +++ kio_atlantik.cpp 7 Oct 2004 14:37:03 -0000 1.9 @@ -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,19 +48,19 @@ *proc << "atlantik"; #ifdef KDE_3_1_FEATURES - QString host = KProcess::quote( url.hasHost() ? url.host() : url.queryItem("host") ); - QString game = KProcess::quote(url.queryItem("game")); + QString host = url.hasHost() ? url.host() : KProcess::quote( url.queryItem("host") ); #else QString host = url.hasHost() ? url.host() : url.queryItem("host"); - QString game = url.queryItem("game")); #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);