diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-02-11 11:55:00 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-02-11 14:41:17 +0000 |
commit | eb651f9fd6c159713fcfdb20b0074f71217b2a40 (patch) | |
tree | 9fd078307b036819b027e95c96d89c8f1cec6e61 /src/plugins/qmakeprojectmanager/qmakeparser.cpp | |
parent | 3990c1c7edc4cb389061ecb4e1afdee30ffda60b (diff) | |
download | qt-creator-eb651f9fd6c159713fcfdb20b0074f71217b2a40.tar.gz |
Qmake: moc notes no longer are considered to be errors
Change-Id: Ifccd877d5096279f38a0084a4cb0eba0e7705d87
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/qmakeparser.cpp')
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeparser.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakeparser.cpp b/src/plugins/qmakeprojectmanager/qmakeparser.cpp index f91b8b2db4..4af888cc2c 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparser.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparser.cpp @@ -44,14 +44,21 @@ void QMakeParser::stdError(const QString &line) if (m_error.indexIn(lne) > -1) { QString fileName = m_error.cap(1); Task::TaskType type = Task::Error; + const QString description = m_error.cap(3); if (fileName.startsWith(QLatin1String("WARNING: "))) { type = Task::Warning; fileName = fileName.mid(9); } else if (fileName.startsWith(QLatin1String("ERROR: "))) { fileName = fileName.mid(7); } + if (description.startsWith(QLatin1String("note:"), Qt::CaseInsensitive)) + type = Task::Unknown; + else if (description.startsWith(QLatin1String("warning:"), Qt::CaseInsensitive)) + type = Task::Warning; + else if (description.startsWith(QLatin1String("error:"), Qt::CaseInsensitive)) + type = Task::Error; Task task = Task(type, - m_error.cap(3) /* description */, + description, Utils::FileName::fromUserInput(fileName), m_error.cap(2).toInt() /* line */, Core::Id(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); @@ -173,7 +180,17 @@ void QmakeProjectManagerPlugin::testQmakeOutputParsers_data() Utils::FileName::fromUserInput(QLatin1String("e:\\QtSDK\\Simulator\\Qt\\msvc2008\\lib\\qtmaind.prl")), 1, categoryBuildSystem)) << QString(); -} + QTest::newRow("moc note") + << QString::fromLatin1("/home/qtwebkithelpviewer.h:0: Note: No relevant classes found. No output generated.") + << OutputParserTester::STDERR + << QString() << QString() + << (QList<ProjectExplorer::Task>() + << Task(Task::Unknown, + QLatin1String("Note: No relevant classes found. No output generated."), + Utils::FileName::fromUserInput(QLatin1String("/home/qtwebkithelpviewer.h")), 0, + categoryBuildSystem) + ) + << QString();} void QmakeProjectManagerPlugin::testQmakeOutputParsers() { |