Trim console output (fixes excessive whitespace in Windows console output)
This commit is contained in:
parent
0a715a7b78
commit
b5ae2e974d
@ -36,6 +36,11 @@ void ConsoleWindow::write(QString data, MessageLevel::Enum mode)
|
|||||||
if (data.endsWith('\n'))
|
if (data.endsWith('\n'))
|
||||||
data = data.left(data.length()-1);
|
data = data.left(data.length()-1);
|
||||||
QStringList paragraphs = data.split('\n');
|
QStringList paragraphs = data.split('\n');
|
||||||
|
for(QString ¶graph : paragraphs)
|
||||||
|
{
|
||||||
|
paragraph = paragraph.trimmed();
|
||||||
|
}
|
||||||
|
|
||||||
QListIterator<QString> iter(paragraphs);
|
QListIterator<QString> iter(paragraphs);
|
||||||
if (mode == MessageLevel::MultiMC)
|
if (mode == MessageLevel::MultiMC)
|
||||||
while(iter.hasNext())
|
while(iter.hasNext())
|
||||||
|
Loading…
Reference in New Issue
Block a user