summaryrefslogtreecommitdiffstats
path: root/gui/consolewindow.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-16 02:46:57 +0100
committerSky <git@bunnies.cc>2013-10-16 02:46:57 +0100
commitb5ae2e974d7044545d4f41c067e1b228806d54b7 (patch)
treebd39bee11127483ffbd008540c5f6232cb21ca95 /gui/consolewindow.cpp
parent0a715a7b781410e4642c1585ad071ae5ba916b9d (diff)
downloadMultiMC-b5ae2e974d7044545d4f41c067e1b228806d54b7.tar
MultiMC-b5ae2e974d7044545d4f41c067e1b228806d54b7.tar.gz
MultiMC-b5ae2e974d7044545d4f41c067e1b228806d54b7.tar.lz
MultiMC-b5ae2e974d7044545d4f41c067e1b228806d54b7.tar.xz
MultiMC-b5ae2e974d7044545d4f41c067e1b228806d54b7.zip
Trim console output (fixes excessive whitespace in Windows console output)
Diffstat (limited to 'gui/consolewindow.cpp')
-rw-r--r--gui/consolewindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gui/consolewindow.cpp b/gui/consolewindow.cpp
index 628c5f00..5cd332c4 100644
--- a/gui/consolewindow.cpp
+++ b/gui/consolewindow.cpp
@@ -36,6 +36,11 @@ void ConsoleWindow::write(QString data, MessageLevel::Enum mode)
if (data.endsWith('\n'))
data = data.left(data.length()-1);
QStringList paragraphs = data.split('\n');
+ for(QString &paragraph : paragraphs)
+ {
+ paragraph = paragraph.trimmed();
+ }
+
QListIterator<QString> iter(paragraphs);
if (mode == MessageLevel::MultiMC)
while(iter.hasNext())