[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.144,1.145
[email protected] Tue, 17 Jun 2003 20:14:11 +0200 (CEST)
Newsgroups
gmane.comp.kde.devel.atlantik
Message-ID
<[email protected] >
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv15240
Modified Files:
atlantik.cpp
Log Message:
fix disconnect problem where sometimes the select game widget appears after starting a game
Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -d -r1.144 -r1.145
--- atlantik.cpp 9 Jun 2003 19:12:35 -0000 1.144
+++ atlantik.cpp 17 Jun 2003 18:14:05 -0000 1.145
@@ -232,13 +232,13 @@
if (m_selectGame)
{
disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
- connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
delete m_selectGame;
m_selectGame = 0;
}
initNetworkObject();
+ connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
connect(m_selectServer, SIGNAL(serverConnect(const QString, int)), m_atlantikNetwork, SLOT(serverConnect(const QString, int)));
}
@@ -264,18 +264,17 @@
{
delete m_selectServer;
m_selectServer = 0;
-
- disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
}
if (m_selectConfiguration)
{
delete m_selectConfiguration;
m_selectConfiguration = 0;
-
- disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
}
+ // Game list clear has a different meaning now
+ disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
connect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
+
connect(m_atlantikNetwork, SIGNAL(gameListAdd(QString, QString, QString, QString, QString, bool)), m_selectGame, SLOT(slotGameListAdd(QString, QString, QString, QString, QString, bool)));
connect(m_atlantikNetwork, SIGNAL(gameListEdit(QString, QString, QString, QString, QString, bool)), m_selectGame, SLOT(slotGameListEdit(QString, QString, QString, QString, QString, bool)));
connect(m_atlantikNetwork, SIGNAL(gameListDel(QString)), m_selectGame, SLOT(slotGameListDel(QString)));
@@ -291,7 +290,6 @@
if (m_selectGame)
{
disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
- connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
delete m_selectGame;
m_selectGame = 0;
@@ -305,6 +303,7 @@
m_mainLayout->addMultiCellWidget(m_selectConfiguration, 0, 2, 1, 1);
m_selectConfiguration->show();
+ connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
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_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame()));
@@ -333,7 +332,6 @@
if (m_selectGame)
{
disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
- connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
delete m_selectGame;
m_selectGame = 0;
@@ -356,6 +354,8 @@
for (QPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it)
if ((portfolioView = dynamic_cast<PortfolioView*>(*it)))
portfolioView->buildPortfolio();
+
+ connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
}
void Atlantik::freezeBoard()