Trim console output (fixes excessive whitespace in Windows console output)

This commit is contained in:
Sky 2013-10-16 02:46:57 +01:00
parent 0a715a7b78
commit b5ae2e974d

View File

@ -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())