forked from qt-creator/qt-creator
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: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Tobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
This commit is contained in:
committed by
Fanda Vacek
parent
376f58df34
commit
f7daff90fe
@@ -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
|
// 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.
|
// messages has all whitespaces at the beginning of the message trimmed.
|
||||||
static QRegExp regexp(QLatin1String(
|
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)
|
if (!regexp.exactMatch(line) || regexp.captureCount() != 6)
|
||||||
return;
|
return;
|
||||||
@@ -169,7 +169,7 @@ void Slog2InfoRunner::processLogLine(const QString &line)
|
|||||||
if (bufferName == QLatin1String("default") && bufferId == 8900)
|
if (bufferName == QLatin1String("default") && bufferId == 8900)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit output(regexp.cap(6) + QLatin1Char('\n'), Utils::StdOutFormat);
|
emit output(regexp.cap(6).trimmed() + QLatin1Char('\n'), Utils::StdOutFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Slog2InfoRunner::readLogStandardError()
|
void Slog2InfoRunner::readLogStandardError()
|
||||||
|
|||||||
Reference in New Issue
Block a user