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