Skip to content

Commit

Permalink
Don't trim log messages to avoid lose \n character
Browse files Browse the repository at this point in the history
  • Loading branch information
edipo2s committed Sep 16, 2019
1 parent e551c19 commit 0d6e2d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mtg/mtgalogparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void MtgaLogParser::parse(QString logNewContent)
lastMatchLogMsgs.push(logNewContent);
}
// Extract raw msgs
QRegularExpressionMatchIterator iterator = reRawMsg.globalMatch(logNewContent + "\n");
QRegularExpressionMatchIterator iterator = reRawMsg.globalMatch(logNewContent);
QList<QString> rawMsgs;
while (iterator.hasNext()) {
rawMsgs << iterator.next().captured(0);
Expand Down
2 changes: 1 addition & 1 deletion src/mtg/mtgalogwatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void MtgaLogWatcher::checkForNewLogs()
} else {
logFile->seek(lastFilePos);
QByteArray logNewContent = logFile->readAll();
emit sgnNewLogContent(QString::fromUtf8(logNewContent.trimmed()));
emit sgnNewLogContent(QString::fromUtf8(logNewContent));
lastFilePos = logFile->pos();
}
}
Expand Down

0 comments on commit 0d6e2d1

Please sign in to comment.