refactor: reprocess log lines per instance

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-03-22 10:32:17 +01:00
parent 77932061bc
commit 9418c62d95
2 changed files with 6 additions and 6 deletions

View File

@ -61,13 +61,10 @@ LoggedProcess::~LoggedProcess()
}
}
static QString m_leftover_line;
QStringList reprocess(const QByteArray& data, QTextDecoder& decoder)
QStringList LoggedProcess::reprocess(const QByteArray& data, QTextDecoder& decoder)
{
auto str = decoder.toUnicode(data);
// FIXME: Flush this out when process exits
if (!m_leftover_line.isEmpty()) {
str.prepend(m_leftover_line);
m_leftover_line = "";