* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
32 lines
685 B
C++
32 lines
685 B
C++
#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;
|
|
}
|