2015-07-21 01:38:15 +01:00
|
|
|
#include "TextPrint.h"
|
|
|
|
|
|
|
|
TextPrint::TextPrint(LaunchTask * parent, const QStringList &lines, MessageLevel::Enum level) : LaunchStep(parent)
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
m_lines = lines;
|
|
|
|
m_level = level;
|
2015-07-21 01:38:15 +01:00
|
|
|
}
|
|
|
|
TextPrint::TextPrint(LaunchTask *parent, const QString &line, MessageLevel::Enum level) : LaunchStep(parent)
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
m_lines.append(line);
|
|
|
|
m_level = level;
|
2015-07-21 01:38:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void TextPrint::executeTask()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
emit logLines(m_lines, m_level);
|
|
|
|
emitSucceeded();
|
2015-07-21 01:38:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TextPrint::canAbort() const
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
return true;
|
2015-07-21 01:38:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
bool TextPrint::abort()
|
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
emitFailed("Aborted.");
|
|
|
|
return true;
|
2015-07-21 01:38:15 +01:00
|
|
|
}
|