From atlantik-devel Tue Apr 30 15:04:45 2002 From: kde () office ! kde ! org Date: Tue, 30 Apr 2002 15:04:45 +0000 To: atlantik-devel Subject: [atlantik-devel] CVS: kdegames/atlantik/libatlantikclient atlantik_network.cpp,1.30,1.31 atlantik_ne X-MARC-Message: https://marc.info/?l=atlantik-devel&m=102017919003629 Update of /home/kde/kdegames/atlantik/libatlantikclient In directory office:/tmp/cvs-serv13675/libatlantikclient Modified Files: atlantik_network.cpp atlantik_network.h Log Message: finished and completed switch to KExtendedSocket and removed old QSocket ifdefs Index: atlantik_network.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- atlantik_network.cpp 2002/04/29 13:42:35 1.30 +++ atlantik_network.cpp 2002/04/30 15:04:42 1.31 @@ -25,19 +25,13 @@ #include #include -#define USE_KDE 1 - #include "atlantik_network.h" #include "atlantik_network.moc" //#include "atlantik.h" //#include "trade_widget.h" -#ifndef USE_KDE -AtlantikNetwork::AtlantikNetwork(AtlanticCore *atlanticCore, QObject *parent, const char *name) : QSocket(parent, name) -#else AtlantikNetwork::AtlantikNetwork(AtlanticCore *atlanticCore, QObject *parent, const char *name) : KExtendedSocket(0, 0, KExtendedSocket::inputBufferedSocket) -#endif { m_atlanticCore = atlanticCore; m_parent = parent; @@ -197,11 +191,7 @@ void AtlantikNetwork::writeData(QString msg) { msg.append("\n"); -#ifndef USE_KDE - if (state()==QSocket::Connection) -#else - if (socketStatus()==KExtendedSocket::connected) -#endif + if (socketStatus() == KExtendedSocket::connected) { kdDebug() << "out [" << msg << "]" << endl; writeBlock(msg.latin1(), strlen(msg.latin1())); @@ -213,10 +203,6 @@ void AtlantikNetwork::slotRead() { kdDebug() << "slotRead, " << bytesAvailable() << " bytes available" << endl; -#ifndef USE_KDE - while(canReadLine()) - processMsg(readLine()); -#else char *tmp = new char[1024 * 32]; while(canReadLine()) { @@ -225,7 +211,6 @@ processMsg(tmp); } delete[] tmp; -#endif // Maximum message size. Messages won't get bigger than 32k anyway, so // if we didn't receive a newline by now, we probably won't anyway. @@ -735,11 +720,7 @@ void AtlantikNetwork::serverConnect(const QString host, int port) { -#ifndef USE_KDE - connectToHost(host, port); -#else setAddress(host, port); enableRead(true); startAsyncConnect(); -#endif } Index: atlantik_network.h =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- atlantik_network.h 2002/04/28 22:58:27 1.15 +++ atlantik_network.h 2002/04/30 15:04:42 1.16 @@ -20,13 +20,7 @@ #include #include -#define USE_KDE 1 - -#ifndef USE_KDE -#include -#else #include -#endif class AtlanticCore; @@ -36,11 +30,7 @@ class Trade; class Auction; -//#ifndef USE_KDE -//class AtlantikNetwork : public QSocket -//#else class AtlantikNetwork : public KExtendedSocket -//#endif { Q_OBJECT _______________________________________________ atlantik-devel mailing list atlantik-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/atlantik-devel