summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/pages/LogPage.cpp2
-rw-r--r--logic/MinecraftProcess.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/gui/pages/LogPage.cpp b/gui/pages/LogPage.cpp
index 719eba03..16d4f941 100644
--- a/gui/pages/LogPage.cpp
+++ b/gui/pages/LogPage.cpp
@@ -180,10 +180,12 @@ void LogPage::write(QString data, MessageLevel::Enum mode)
{
format.setForeground(QColor("red"));
format.setBackground(QColor("black"));
+ break;
}
case MessageLevel::PrePost:
{
format.setForeground(QColor("grey"));
+ break;
}
case MessageLevel::Info:
case MessageLevel::Message:
diff --git a/logic/MinecraftProcess.cpp b/logic/MinecraftProcess.cpp
index c9738176..b9be8d05 100644
--- a/logic/MinecraftProcess.cpp
+++ b/logic/MinecraftProcess.cpp
@@ -177,8 +177,8 @@ MessageLevel::Enum MinecraftProcess::guessLevel(const QString &line, MessageLeve
}
if (line.contains("overwriting existing"))
return MessageLevel::Fatal;
- if (line.contains("Exception in thread") || line.contains(" at "))
- return MessageLevel::Fatal;
+ if (line.contains("Exception in thread") || line.contains(QRegularExpression("\\s+at ")))
+ return MessageLevel::Error;
return level;
}
@@ -237,6 +237,7 @@ void MinecraftProcess::on_stdErr()
QByteArray data = readAllStandardError();
QString str = m_err_leftover + QString::fromLocal8Bit(data);
+ str.remove('\r');
QStringList lines = str.split("\n");
m_err_leftover = lines.takeLast();
@@ -248,6 +249,7 @@ void MinecraftProcess::on_stdOut()
QByteArray data = readAllStandardOutput();
QString str = m_out_leftover + QString::fromLocal8Bit(data);
+ str.remove('\r');
QStringList lines = str.split("\n");
m_out_leftover = lines.takeLast();
@@ -259,6 +261,7 @@ void MinecraftProcess::on_prepost_stdErr()
QByteArray data = m_prepostlaunchprocess.readAllStandardError();
QString str = m_err_leftover + QString::fromLocal8Bit(data);
+ str.remove('\r');
QStringList lines = str.split("\n");
m_err_leftover = lines.takeLast();
@@ -270,6 +273,7 @@ void MinecraftProcess::on_prepost_stdOut()
QByteArray data = m_prepostlaunchprocess.readAllStandardOutput();
QString str = m_out_leftover + QString::fromLocal8Bit(data);
+ str.remove('\r');
QStringList lines = str.split("\n");
m_out_leftover = lines.takeLast();