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

View File

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