aboutsummaryrefslogtreecommitdiff
path: root/launcher/launch/steps/TextPrint.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-07-25 19:11:59 +0200
committerPetr Mrázek <peterix@gmail.com>2021-07-25 19:50:44 +0200
commit20b9f2b42a3b58b6081af271774fbcc34025dccb (patch)
tree064fa59facb3357139b47bd4e60bfc8edb35ca11 /launcher/launch/steps/TextPrint.cpp
parentdd133680858351e3e07690e286882327a4f42ba5 (diff)
downloadPrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.gz
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.bz2
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.zip
NOISSUE Flatten gui and logic libraries into MultiMC
Diffstat (limited to 'launcher/launch/steps/TextPrint.cpp')
-rw-r--r--launcher/launch/steps/TextPrint.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/launcher/launch/steps/TextPrint.cpp b/launcher/launch/steps/TextPrint.cpp
new file mode 100644
index 00000000..0c1f320c
--- /dev/null
+++ b/launcher/launch/steps/TextPrint.cpp
@@ -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;
+}