From 8540effe3ac9163caffc60e251e709809cf85b75 Mon Sep 17 00:00:00 2001 From: Tobias Hunger <tobias.hunger@nokia.com> Date: Mon, 22 Mar 2010 10:09:28 +0100 Subject: [PATCH] Unit test and handle note-lines in gcc output. --- src/plugins/projectexplorer/gccparser.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp index 4d54b1574f1..24999e3cf42 100644 --- a/src/plugins/projectexplorer/gccparser.cpp +++ b/src/plugins/projectexplorer/gccparser.cpp @@ -42,7 +42,7 @@ namespace { GccParser::GccParser() { - m_regExp.setPattern(QString::fromLatin1(FILE_PATTERN) + QLatin1String("(\\d+):(\\d+:)?\\s(#?(warning|error):?\\s)(.+)$")); + m_regExp.setPattern(QString::fromLatin1(FILE_PATTERN) + QLatin1String("(\\d+):(\\d+:)?\\s(#?(warning|error|note):?\\s)(.+)$")); m_regExp.setMinimal(true); m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$"); @@ -375,7 +375,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() << QString() << QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...") << QList<ProjectExplorer::Task>() << QString(); - + QTest::newRow("note") + << QString::fromLatin1("/home/dev/creator/share/qtcreator/gdbmacros/gdbmacros.cpp:1079: note: initialized from here") + << OutputParserTester::STDERR + << QString() << QString() + << ( QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("initialized from here"), + QString::fromLatin1("/home/dev/creator/share/qtcreator/gdbmacros/gdbmacros.cpp"), 1079, + Constants::TASK_CATEGORY_COMPILE)) + << QString(); } void ProjectExplorerPlugin::testGccOutputParsers() -- GitLab