Commit f7daff90 authored by Frantisek Vacek's avatar Frantisek Vacek Committed by Fanda Vacek

QNX: Fixed bug in BlackBerry slog2 parser

slog2 parser has ignored all slog2 messages not beginning with a letter.
For example:
console.debug("#### message prefixed with some hashes");
was silently ignored by slog2 parser and wasn't send to the QTC application
output window.

Change-Id: Ie4cac329d192c8b330226b99141848a1c0c0c715
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
Reviewed-by: default avatarMehdi Fekari <mfekari@blackberry.com>
Reviewed-by: default avatarRafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: default avatarTobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent 376f58df
......@@ -142,7 +142,7 @@ void Slog2InfoRunner::processLogLine(const QString &line)
// how many spaces represent separators and how many are a part of the messages, so resulting
// messages has all whitespaces at the beginning of the message trimmed.
static QRegExp regexp(QLatin1String(
"^[a-zA-Z]+\\s+([0-9]+ [0-9]+:[0-9]+:[0-9]+.[0-9]+)\\s+(\\S+)(\\s+(\\S+))?\\s+([0-9]+)\\s+(\\b.*)?$"));
"^[a-zA-Z]+\\s+([0-9]+ [0-9]+:[0-9]+:[0-9]+.[0-9]+)\\s+(\\S+)(\\s+(\\S+))?\\s+([0-9]+)\\s+(.*)?$"));
if (!regexp.exactMatch(line) || regexp.captureCount() != 6)
return;
......@@ -169,7 +169,7 @@ void Slog2InfoRunner::processLogLine(const QString &line)
if (bufferName == QLatin1String("default") && bufferId == 8900)
return;
emit output(regexp.cap(6) + QLatin1Char('\n'), Utils::StdOutFormat);
emit output(regexp.cap(6).trimmed() + QLatin1Char('\n'), Utils::StdOutFormat);
}
void Slog2InfoRunner::readLogStandardError()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment