Merge pull request #1508 from comp500/fix/allow-empty-lines

This commit is contained in:
Sefa Eyeoglu 2023-08-15 10:53:43 +02:00 committed by GitHub
commit a360ddbe0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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