From fc198dd3085a2cd33fbaa7a3d2c95c2c8d3ee31a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 8 Aug 2016 00:00:11 +0200 Subject: NOISSUE rework of minecraft log Now uses a model and a list view instead of text This lets mmc keep track of the contents regardless of whether the instance windows are open This is currently missing a way to select and copy text from the log. --- api/logic/launch/LaunchTask.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'api/logic/launch/LaunchTask.h') diff --git a/api/logic/launch/LaunchTask.h b/api/logic/launch/LaunchTask.h index 447445ca..f2fb3a2c 100644 --- a/api/logic/launch/LaunchTask.h +++ b/api/logic/launch/LaunchTask.h @@ -17,6 +17,8 @@ #pragma once #include +#include +#include "LogModel.h" #include "BaseInstance.h" #include "MessageLevel.h" #include "LoggedProcess.h" @@ -80,6 +82,8 @@ public: /* methods */ */ virtual bool abort() override; + shared_qobject_ptr getLogModel(); + public: QString substituteVariables(const QString &cmd) const; QString censorPrivateInfo(QString in); @@ -98,13 +102,6 @@ signals: void requestLogging(); - /** - * @brief emitted when we want to log something - * @param text the text to log - * @param level the level to log at - */ - void log(QString text, MessageLevel::Enum level = MessageLevel::MultiMC); - public slots: void onLogLines(const QStringList& lines, MessageLevel::Enum defaultLevel = MessageLevel::MultiMC); void onLogLine(QString line, MessageLevel::Enum defaultLevel = MessageLevel::MultiMC); @@ -114,6 +111,7 @@ public slots: protected: /* data */ InstancePtr m_instance; + shared_qobject_ptr m_logModel; QList > m_steps; QMap m_censorFilter; int currentStep = -1; -- cgit v1.2.3