GH-1053 explode launch task into many small steps, each a Task

This commit is contained in:
Petr Mrázek
2015-07-21 02:38:15 +02:00
parent 8e7caf4e25
commit 61c5a67777
36 changed files with 1261 additions and 595 deletions

View File

@ -0,0 +1,29 @@
#include "TextPrint.h"
TextPrint::TextPrint(LaunchTask * parent, const QStringList &lines, MessageLevel::Enum level) : LaunchStep(parent)
{
m_lines = lines;
m_level = level;
}
TextPrint::TextPrint(LaunchTask *parent, const QString &line, MessageLevel::Enum level) : LaunchStep(parent)
{
m_lines.append(line);
m_level = level;
}
void TextPrint::executeTask()
{
emit logLines(m_lines, m_level);
emitSucceeded();
}
bool TextPrint::canAbort() const
{
return true;
}
bool TextPrint::abort()
{
emitFailed("Aborted.");
return true;
}