cutter/src/common/CommandTask.cpp

17 lines
420 B
C++
Raw Normal View History

2018-06-22 17:29:42 +00:00
#include "CommandTask.h"
2018-10-21 14:53:38 +00:00
#include "TempConfig.h"
2018-06-22 17:29:42 +00:00
2018-10-21 14:53:38 +00:00
CommandTask::CommandTask(const QString &cmd, ColorMode colorMode, bool outFormatHtml)
: cmd(cmd), colorMode(colorMode), outFormatHtml(outFormatHtml)
2018-06-22 17:29:42 +00:00
{
}
2018-10-21 14:53:38 +00:00
void CommandTask::runTask() {
TempConfig tempConfig;
tempConfig.set("scr.color", colorMode);
tempConfig.set("scr.html", outFormatHtml);
2018-06-22 17:29:42 +00:00
auto res = Core()->cmdTask(cmd);
emit finished(res);
}