Bug 61130

Summary: Client tells the game has started when it has not
Product: [Applications] atlantik Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: Rob Kaper <atlantik-devel>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Albert Astals Cid 2003-07-12 13:13:29 UTC
Version:            (using KDE 3.1.9)
Compiler:          gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
OS:          Linux (i686) release 2.4.21-0.18mdk

It is easy to reproduce, go to a server, create a game and then without waiting for people to enter the game, press Start Game.

The status bar will change to "Game started. Retrieving full game data..." but in the lateral bar you'll get "Error: This game requires at least 2 players to be started."
Comment 1 Rob Kaper 2003-07-12 19:49:55 UTC
Subject: KDE_3_1_BRANCH: kdegames/atlantik/client

CVS commit by kaper: 

fix #61130: Client tells the game has started when it has not

CCMAIL: 61130-done@bugs.kde.org


  M +1 -0      atlantik.cpp   1.121.6.19
  M +2 -3      selectconfiguration_widget.cpp   1.26.6.6
  M +1 -2      selectconfiguration_widget.h   1.12.6.4


--- kdegames/atlantik/client/atlantik.cpp  #1.121.6.18:1.121.6.19
@@ -303,4 +303,5 @@ void Atlantik::showSelectConfiguration()
         connect(m_atlantikNetwork, SIGNAL(gameOption(QString, QString, QString, QString, QString)), m_selectConfiguration, SLOT(gameOption(QString, QString, QString, QString, QString)));
         connect(m_atlantikNetwork, SIGNAL(endConfigUpdate()), m_selectConfiguration, SLOT(slotEndUpdate()));
+        connect(m_atlantikNetwork, SIGNAL(gameInit()), m_selectConfiguration, SLOT(initGame()));
         connect(m_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame()));
         connect(m_selectConfiguration, SIGNAL(leaveGame()), m_atlantikNetwork, SLOT(leaveGame()));

--- kdegames/atlantik/client/selectconfiguration_widget.cpp  #1.26.6.5:1.26.6.6
@@ -58,5 +58,5 @@ SelectConfiguration::SelectConfiguration
         serverButtons->addWidget(m_connectButton);
 
-        connect(m_connectButton, SIGNAL(clicked()), this, SLOT(connectClicked()));
+        connect(m_connectButton, SIGNAL(clicked()), this, SIGNAL(startGame()));
 
     // Status indicator.
@@ -71,8 +71,7 @@ SelectConfiguration::~SelectConfiguratio
 }
 
-void SelectConfiguration::connectClicked()
+void SelectConfiguration::initGame()
 {
         m_statusLabel->setText(i18n("Game started. Retrieving full game data..."));
-        emit startGame();
 }
 

--- kdegames/atlantik/client/selectconfiguration_widget.h  #1.12.6.3:1.12.6.4
@@ -39,5 +39,4 @@ public:
         ~SelectConfiguration();
 
-        void initPage();
         void setCanStart(const bool &canStart);
         QString hostToConnect() const;
@@ -45,8 +44,8 @@ public:
 
 private slots:
-        void connectClicked();
         void gameOption(QString title, QString type, QString value, QString edit, QString command);
         void optionChanged();
         void slotEndUpdate();
+        void initGame();
 
 signals: