added admin tab; server status message update

This commit is contained in:
Max-Wilhelm Bruker 2011-01-14 16:55:16 +01:00
parent 714a0eee50
commit bd9e142d1d
20 changed files with 242 additions and 65 deletions

View file

@ -43,15 +43,16 @@ void RemoteClient::slotConnected()
void RemoteClient::loginResponse(ProtocolResponse *response)
{
Response_Login *resp = qobject_cast<Response_Login *>(response);
if (!resp)
disconnectFromServer();
if (resp->getResponseCode() == RespOk) {
if (response->getResponseCode() == RespOk) {
Response_Login *resp = qobject_cast<Response_Login *>(response);
if (!resp) {
disconnectFromServer();
return;
}
setStatus(StatusLoggedIn);
emit userInfoChanged(resp->getUserInfo());
} else {
emit serverError(resp->getResponseCode());
emit serverError(response->getResponseCode());
setStatus(StatusDisconnecting);
}
}