2013-02-02 22:32:54 +00:00
|
|
|
#include "Command.h"
|
|
|
|
#include "ErrorMessage.h"
|
2011-02-19 03:53:06 +00:00
|
|
|
|
2012-07-08 19:04:30 +00:00
|
|
|
Command::Command(QObject *parent) : QObject(parent) {
|
2011-02-19 03:53:06 +00:00
|
|
|
}
|
|
|
|
|
2012-06-29 16:14:22 +00:00
|
|
|
QString Command::toString() const {
|
|
|
|
return metaObject()->className();
|
|
|
|
}
|
2012-12-12 06:47:54 +00:00
|
|
|
|
2013-02-11 23:31:41 +00:00
|
|
|
void Command::finish(bool success) {
|
2012-12-12 06:47:54 +00:00
|
|
|
emit finished(new Response(success, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 23:31:41 +00:00
|
|
|
void Command::finish(bool success, QString message) {
|
2012-12-12 06:47:54 +00:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 23:31:41 +00:00
|
|
|
void Command::finish(bool success, QByteArray message) {
|
2012-12-30 22:47:16 +00:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|
|
|
|
|
2013-02-11 23:31:41 +00:00
|
|
|
void Command::finish(bool success, ErrorMessage *message) {
|
2013-02-02 22:32:54 +00:00
|
|
|
emit finished(new Response(success, message, this));
|
|
|
|
}
|