This commit is contained in:
Max-Wilhelm Bruker 2009-07-11 20:18:34 +02:00
parent b12155f59c
commit 2e50822d48
2 changed files with 9 additions and 0 deletions

View file

@ -29,6 +29,8 @@ GameSelector::GameSelector(Client *_client, QWidget *parent)
connect(joinButton, SIGNAL(clicked()), this, SLOT(actJoin()));
connect(client, SIGNAL(gameListEvent(ServerGame *)), gameListModel, SLOT(updateGameList(ServerGame *)));
connect(client, SIGNAL(statusChanged(ProtocolStatus)), this, SLOT(statusChanged(ProtocolStatus)));
client->listGames();
}
@ -44,6 +46,12 @@ void GameSelector::actRefresh()
client->listGames();
}
void GameSelector::statusChanged(ProtocolStatus status)
{
if (status == StatusDisconnected)
deleteLater();
}
void GameSelector::checkResponse(ServerResponse response)
{
createButton->setEnabled(true);

View file

@ -18,6 +18,7 @@ private slots:
void actRefresh();
void actJoin();
void checkResponse(ServerResponse response);
void statusChanged(ProtocolStatus status);
private:
Client *client;