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(joinButton, SIGNAL(clicked()), this, SLOT(actJoin()));
|
||||||
|
|
||||||
connect(client, SIGNAL(gameListEvent(ServerGame *)), gameListModel, SLOT(updateGameList(ServerGame *)));
|
connect(client, SIGNAL(gameListEvent(ServerGame *)), gameListModel, SLOT(updateGameList(ServerGame *)));
|
||||||
|
connect(client, SIGNAL(statusChanged(ProtocolStatus)), this, SLOT(statusChanged(ProtocolStatus)));
|
||||||
|
|
||||||
client->listGames();
|
client->listGames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +46,12 @@ void GameSelector::actRefresh()
|
||||||
client->listGames();
|
client->listGames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameSelector::statusChanged(ProtocolStatus status)
|
||||||
|
{
|
||||||
|
if (status == StatusDisconnected)
|
||||||
|
deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
void GameSelector::checkResponse(ServerResponse response)
|
void GameSelector::checkResponse(ServerResponse response)
|
||||||
{
|
{
|
||||||
createButton->setEnabled(true);
|
createButton->setEnabled(true);
|
||||||
|
|
|
@ -18,6 +18,7 @@ private slots:
|
||||||
void actRefresh();
|
void actRefresh();
|
||||||
void actJoin();
|
void actJoin();
|
||||||
void checkResponse(ServerResponse response);
|
void checkResponse(ServerResponse response);
|
||||||
|
void statusChanged(ProtocolStatus status);
|
||||||
private:
|
private:
|
||||||
Client *client;
|
Client *client;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue