bugfix
This commit is contained in:
parent
b12155f59c
commit
2e50822d48
2 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -18,6 +18,7 @@ private slots:
|
|||
void actRefresh();
|
||||
void actJoin();
|
||||
void checkResponse(ServerResponse response);
|
||||
void statusChanged(ProtocolStatus status);
|
||||
private:
|
||||
Client *client;
|
||||
|
||||
|
|
Loading…
Reference in a new issue