[prev in list] [next in list] [prev in thread] [next in thread]
List: atlantik-devel
Subject: [atlantik-devel] CVS: kdegames/atlantik/client atlantik.cpp,1.89,1.90 main.cpp,1.26,1.27
From: kde () office ! kde ! org
Date: 2002-04-28 22:58:29
[Download RAW message or body]
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv20945/client
Modified Files:
atlantik.cpp main.cpp
Log Message:
KExtendedSocket instead of QSocket
Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- atlantik.cpp 2002/04/28 03:57:57 1.89
+++ atlantik.cpp 2002/04/28 22:58:27 1.90
@@ -38,6 +38,10 @@
#include <board.h>
#include <trade_widget.h>
+#ifdef USE_KDE
+#include <errno.h>
+#endif
+
#include "selectserver_widget.h"
#include "selectgame_widget.h"
#include "selectconfiguration_widget.h"
@@ -76,8 +80,7 @@
connect(m_atlantikNetwork, SIGNAL(error(int)), this, SLOT(slotNetworkError(int)));
#else
connect(m_atlantikNetwork, SIGNAL(connectionSuccess()), this, \
SLOT(slotNetworkConnected()));
- connect(m_atlantikNetwork, SIGNAL(error(int)), this, SLOT(slotNetworkError(int)));
- connect(m_atlantikNetwork, SIGNAL(connectionFailed(int)), this, \
SLOT(slotNetworkConnected())); + connect(m_atlantikNetwork, \
SIGNAL(connectionFailed(int)), this, SLOT(slotNetworkError(int))); #endif
connect(m_atlantikNetwork, SIGNAL(joinedGame()), this, SLOT(slotJoinedGame()));
@@ -251,12 +254,12 @@
connect(m_selectGame, SIGNAL(newGame(const QString &)), m_atlantikNetwork, \
SLOT(newGame(const QString &))); }
-void Atlantik::slotNetworkError(int errno)
+void Atlantik::slotNetworkError(int errnum)
{
QString errMsg(i18n("Error connecting: "));
#ifndef USE_KDE
- switch(errno)
+ switch(errnum)
{
case QSocket::ErrConnectionRefused:
errMsg.append(i18n("connection refused by host."));
@@ -273,8 +276,25 @@
default:
errMsg.append(i18n("unknown error."));
}
- serverMsgsAppend(errMsg);
+#else
+ switch (m_atlantikNetwork->status())
+ {
+ case IO_ConnectError:
+ if (errnum == ECONNREFUSED)
+ errMsg.append(i18n("connection refused by host."));
+ else
+ errMsg.append(i18n("could not connect to host."));
+ break;
+
+ case IO_LookupError:
+ errMsg.append(i18n("host not found."));
+ break;
+
+ default:
+ errMsg.append(i18n("unknown error."));
+ }
#endif
+ serverMsgsAppend(errMsg);
}
void Atlantik::slotJoinedGame()
Index: main.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/main.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- main.cpp 2002/04/23 16:56:30 1.26
+++ main.cpp 2002/04/28 22:58:27 1.27
@@ -36,9 +36,12 @@
aboutData.addAuthor("Rob Kaper", I18N_NOOP("main author"), "cap@capsi.com", \
"http://capsi.com/");
+ // Patches and artists
+ aboutData.addCredit("Thiago Macieira", I18N_NOOP("KExtendedSocket support"), \
"thiagom@wanadoo.fr"); +
aboutData.addCredit("Bart Szyszka", I18N_NOOP("application icon"), \
"bart@gigabee.com", "http://www.gigabee.com/");
- aboutData.addCredit("Elhay Achiam", I18N_NOOP("auction icon"), \
"elhay_a@bezeqint.net");
- aboutData.addCredit("Carlo Caneva", I18N_NOOP("various icons"), \
"webmaster@molecola.com", "http://www.molecola.com/"); + aboutData.addCredit("Elhay \
Achiam", I18N_NOOP("icons"), "elhay_a@bezeqint.net"); + aboutData.addCredit("Carlo \
Caneva", I18N_NOOP("icons"), "webmaster@molecola.com", "http://www.molecola.com/");
KCmdLineArgs::init(argc, argv, &aboutData);
_______________________________________________
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