[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-devel] CVS: kdegames/atlantik/libatlantikclient atlantik_network.cpp,1.30,1.31 atlantik_ne
From: kde () office ! kde ! org
Date: 2002-04-30 15:04:45
[Download RAW message or body]
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 <trade.h>
#include <auction.h>
-#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 <qdom.h>
#include <qmap.h>
-#define USE_KDE 1
-
-#ifndef USE_KDE
-#include <qsocket.h>
-#else
#include <kextsock.h>
-#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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic