OutputFormatter: Do not ignore DebugFormat

On Windows applications may print to the Windows internal
debug console. This output is retrieved and passed around as
DebugFormat as it is impossible to guess whether stdout or
stderr had been used when printing.
But output in DebugFormat had been ignored so far - fix this
and handle this as inside the Qt test parser.

Fixes: QTCREATORBUG-24560
Change-Id: Ic5e3723c3e3e47556264e4c5cf719706ee7eaf1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Christian Stenger
2021-01-13 12:52:23 +01:00
parent b7758eebb2
commit c9a956c989
2 changed files with 4 additions and 2 deletions

View File

@@ -329,7 +329,9 @@ OutputLineParser::Result OutputFormatter::handleMessage(const QString &text, Out
QList<OutputLineParser *> &involvedParsers)
{
// We only invoke the line parsers for stdout and stderr
if (format != StdOutFormat && format != StdErrFormat)
// Bad: on Windows we may get stdout and stdErr only as DebugFormat as e.g. GUI applications
// print them Windows-internal and we retrieve this separately
if (format != StdOutFormat && format != StdErrFormat && format != DebugFormat)
return OutputLineParser::Status::NotHandled;
const OutputLineParser * const oldNextParser = d->nextParser;
if (d->nextParser) {

View File

@@ -49,7 +49,7 @@ namespace Internal {
OutputLineParser::Result QtTestParser::handleLine(const QString &line, OutputFormat type)
{
if (type != StdOutFormat)
if (type != StdOutFormat && type != DebugFormat)
return Status::NotHandled;
const QString theLine = rightTrimmed(line);