Commit 2e50822d authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

bugfix

parent b12155f5
...@@ -29,6 +29,8 @@ GameSelector::GameSelector(Client *_client, QWidget *parent) ...@@ -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() ...@@ -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: ...@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment