mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
blah
This commit is contained in:
parent
55482246dd
commit
59e9416f57
29 changed files with 332 additions and 187 deletions
|
|
@ -32,7 +32,7 @@ Client::~Client()
|
|||
|
||||
void Client::slotSocketError(QAbstractSocket::SocketError /*error*/)
|
||||
{
|
||||
emit logSocketError(socket->errorString());
|
||||
emit socketError(socket->errorString());
|
||||
disconnectFromServer();
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ void Client::loginResponse(ResponseCode response)
|
|||
setStatus(StatusLoggedIn);
|
||||
else {
|
||||
emit serverError(response);
|
||||
disconnectFromServer();
|
||||
setStatus(StatusDisconnecting);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -82,10 +82,13 @@ void Client::readData()
|
|||
connect(cmdLogin, SIGNAL(finished(ResponseCode)), this, SLOT(loginResponse(ResponseCode)));
|
||||
sendCommand(cmdLogin);
|
||||
|
||||
topLevelItem->read(xmlReader);
|
||||
if (topLevelItem)
|
||||
topLevelItem->read(xmlReader);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status == StatusDisconnecting)
|
||||
disconnectFromServer();
|
||||
}
|
||||
|
||||
void Client::processProtocolItem(ProtocolItem *item)
|
||||
|
|
@ -96,10 +99,9 @@ void Client::processProtocolItem(ProtocolItem *item)
|
|||
if (!cmd)
|
||||
return;
|
||||
|
||||
pendingCommands.remove(cmd->getCmdId());
|
||||
cmd->processResponse(response);
|
||||
delete response;
|
||||
|
||||
pendingCommands.remove(cmd->getCmdId());
|
||||
delete cmd;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue