mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-08-03 01:15:41 -07:00
Split PendingCommand 's implementation to its own cpp to permit automoc
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#include "pending_command.h"
|
||||
|
||||
PendingCommand::PendingCommand(const CommandContainer &_commandContainer, QVariant _extraData)
|
||||
: commandContainer(_commandContainer), extraData(_extraData), ticks(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CommandContainer & PendingCommand::getCommandContainer()
|
||||
{
|
||||
return commandContainer;
|
||||
}
|
||||
|
||||
void PendingCommand::setExtraData(const QVariant &_extraData) {
|
||||
extraData = _extraData;
|
||||
}
|
||||
|
||||
QVariant PendingCommand::getExtraData() const {
|
||||
return extraData;
|
||||
}
|
||||
|
||||
void PendingCommand::processResponse(const Response &response)
|
||||
{
|
||||
emit finished(response, commandContainer, extraData);
|
||||
emit finished(response.response_code());
|
||||
}
|
||||
|
||||
int PendingCommand::tick()
|
||||
{
|
||||
return ++ticks;
|
||||
}
|
||||
Reference in New Issue
Block a user