Allow empty lines in log output

Preserving empty lines in the game log ensures that crash reports and debugging information has necessary whitespace - the previous behaviour made crash reports hard to read.

Signed-off-by: comp500 <comp500@users.noreply.github.com>
This commit is contained in:
comp500 2023-08-09 20:48:02 +01:00
parent 31ffe79a29
commit a351d1834a

View File

@ -66,13 +66,12 @@ QStringList LoggedProcess::reprocess(const QByteArray& data, QTextDecoder& decod
}
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
auto lines = str.remove(QChar::CarriageReturn).split(QChar::LineFeed, QString::SkipEmptyParts);
auto lines = str.remove(QChar::CarriageReturn).split(QChar::LineFeed);
#else
auto lines = str.remove(QChar::CarriageReturn).split(QChar::LineFeed, Qt::SkipEmptyParts);
auto lines = str.remove(QChar::CarriageReturn).split(QChar::LineFeed);
#endif
if (!str.endsWith(QChar::LineFeed))
m_leftover_line = lines.takeLast();
m_leftover_line = lines.takeLast();
return lines;
}