[atlantik-cvs] CVS: kdegames/atlantik/libatlantikclient atlantik_network.cpp,1.76,1.77 atlantik_network.h,1.40,1.41

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikclient
In directory office:/tmp/cvs-serv15713/libatlantikclient

Modified Files:
	atlantik_network.cpp atlantik_network.h 
Log Message:
more descriptive connection messages

Index: atlantik_network.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- atlantik_network.cpp	23 Dec 2002 04:03:54 -0000	1.76
+++ atlantik_network.cpp	24 Dec 2002 10:42:18 -0000	1.77
@@ -41,6 +41,12 @@
 	m_playerId = -1;
 
 	QObject::connect(this, SIGNAL(readyRead()), this, SLOT(slotRead()));
+	QObject::connect(this, SIGNAL(lookupFinished(int)),
+	                 this, SLOT(slotLookupFinished(int)));
+	QObject::connect(this, SIGNAL(connectionSuccess()),
+	                 this, SLOT(slotConnectionSuccess()));
+	QObject::connect(this, SIGNAL(connectionFailed(int)),
+	                 this, SLOT(slotConnectionFailed(int)));
 }
 
 void AtlantikNetwork::rollDice()
@@ -805,5 +811,21 @@
 {
 	setAddress(host, port);
 	enableRead(true);
+	emit msgInfo(i18n("Connecting to %1...").arg(host));
 	startAsyncConnect();
+}
+
+void AtlantikNetwork::slotLookupFinished(int count)
+{
+	emit msgInfo(i18n("Server host name lookup finished..."));
+}
+
+void AtlantikNetwork::slotConnectionSuccess()
+{
+	emit msgInfo(i18n("Connection established!"));
+}
+
+void AtlantikNetwork::slotConnectionFailed(int error)
+{
+	emit msgError(i18n("Connection failed! Error code: %1").arg(error));
 }

Index: atlantik_network.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- atlantik_network.h	23 Dec 2002 04:03:55 -0000	1.40
+++ atlantik_network.h	24 Dec 2002 10:42:18 -0000	1.41
@@ -64,6 +64,9 @@
 	void tradeAccept(Trade *trade);
 	void auctionBid(Auction *auction, int amount);
 	void setImage(const QString &name);
+	void slotLookupFinished(int count);
+	void slotConnectionSuccess();
+	void slotConnectionFailed(int error);
 
 public slots:
 	void serverConnect(const QString host, int port);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.