[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantikclient
From:       kde () office ! kde ! org
Date:       2003-12-07 22:37:34
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/libatlantikclient
In directory office:/tmp/cvs-serv28329/libatlantikclient

Modified Files:
      Tag: atlantik_3_3_branch
	atlantik_network.cpp 
Log Message:
network/core support for new configupdate behavior

Index: atlantik_network.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikclient/atlantik_network.cpp,v
retrieving revision 1.95.2.5
retrieving revision 1.95.2.6
diff -u -d -r1.95.2.5 -r1.95.2.6
--- atlantik_network.cpp	23 Nov 2003 17:24:02 -0000	1.95.2.5
+++ atlantik_network.cpp	7 Dec 2003 22:37:31 -0000	1.95.2.6
@@ -26,6 +26,7 @@
 
 #include <atlantic_core.h>
 #include <auction.h>
+#include <configoption.h>
 #include <estate.h>
 #include <estategroup.h>
 #include <game.h>
@@ -295,8 +296,25 @@
 			}
 			else if (e.tagName() == "configupdate")
 			{
-				int gameId = -1;
+				int configId = -1;
+				a = e.attributeNode(QString("configid"));
+				if (!a.isNull())
+				{
+					configId = a.value().toInt();
+					ConfigOption *configOption;
+					if (!(configOption = m_atlanticCore->findConfigOption(configId)))
+						configOption = m_atlanticCore->newConfigOption( configId );
+
+					a = e.attributeNode(QString("name"));
+					if (configOption && !a.isNull())
+						configOption->setName(a.value());
 
+					a = e.attributeNode(QString("description"));
+					if (configOption && !a.isNull())
+						configOption->setDescription(a.value());
+				}
+
+				int gameId = -1;
 				a = e.attributeNode(QString("gameid"));
 				if (!a.isNull())
 				{
@@ -307,8 +325,8 @@
 						if (!eOption.isNull() && eOption.tagName() == "option")
 							emit gameOption(eOption.attributeNode(QString("title")).value(), \
eOption.attributeNode(QString("type")).value(), \
eOption.attributeNode(QString("value")).value(), \
eOption.attributeNode(QString("edit")).value(), \
eOption.attributeNode(QString("command")).value());  }
+					emit endConfigUpdate();
 				}
-				emit endConfigUpdate();
 			}
 			else if (e.tagName() == "deletegame")
 			{

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic