fixed packet length calculation bug, re-enabled deck selection

This commit is contained in:
Max-Wilhelm Bruker 2011-12-18 19:10:47 +01:00
parent 314f17091d
commit 38e4781624
7 changed files with 30 additions and 11 deletions

View file

@ -5,7 +5,6 @@
#include "pending_command.h"
#include "pb/commands.pb.h"
#include <google/protobuf/descriptor.h>
#include <QDebug>
AbstractClient::AbstractClient(QObject *parent)
: QObject(parent), nextCmdId(0), status(StatusDisconnected)

View file

@ -3,7 +3,6 @@
void PendingCommand::processResponse(ProtocolResponse *response)
{
qDebug("processResponse");
emit finished(response);
emit finished(response->getResponseCode());
}

View file

@ -123,7 +123,7 @@ void DeckViewContainer::loadLocalDeck()
}
Command_DeckSelect cmd;
cmd.set_deck(""); // XXX
cmd.set_deck(deck->writeToString_Native().toStdString());
PendingCommand *pend = static_cast<TabGame *>(parent())->prepareGameCommand(cmd);
connect(pend, SIGNAL(finished(ProtocolResponse *)), this, SLOT(deckSelectFinished(ProtocolResponse *)));
static_cast<TabGame *>(parent())->sendGameCommand(pend, playerId);