diff options
author | comp500 <comp500@users.noreply.github.com> | 2023-08-09 20:48:02 +0100 |
---|---|---|
committer | comp500 <comp500@users.noreply.github.com> | 2023-08-09 20:48:02 +0100 |
commit | a351d1834a01d13a64f38fe970d33e2a9059c54a (patch) | |
tree | e423158c7f25945ab268458282a5afc621651435 | |
parent | 31ffe79a29318b1aa8256ee2897a45633c1e2c6b (diff) | |
download | PrismLauncher-a351d1834a01d13a64f38fe970d33e2a9059c54a.tar.gz PrismLauncher-a351d1834a01d13a64f38fe970d33e2a9059c54a.tar.bz2 PrismLauncher-a351d1834a01d13a64f38fe970d33e2a9059c54a.zip |
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>
-rw-r--r-- | launcher/LoggedProcess.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/launcher/LoggedProcess.cpp b/launcher/LoggedProcess.cpp index 6978777e..40c47d37 100644 --- a/launcher/LoggedProcess.cpp +++ b/launcher/LoggedProcess.cpp @@ -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; } |