Merge pull request #1508 from comp500/fix/allow-empty-lines
This commit is contained in:
commit
a360ddbe0b
@ -65,13 +65,8 @@ 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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user