Commit 5abf7ab9 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

MakeParser: Handle more warnings



Task-number: QTCREATORBUG-8741

Change-Id: I6d3c76dbb59df9db4e14d8e93c2e078a701d1dc1
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent c88ed7d6
......@@ -103,8 +103,14 @@ void GnuMakeParser::stdError(const QString &line)
++m_fatalErrorCount;
if (!m_suppressIssues) {
m_suppressIssues = true;
addTask(Task(Task::Error,
m_makeLine.cap(8),
QString description = m_makeLine.cap(8);
Task::TaskType type = Task::Error;
if (description.startsWith(QLatin1String("warning: "))) {
description = description.mid(9);
type = Task::Warning;
}
addTask(Task(type, description,
Utils::FileName() /* filename */,
-1, /* line */
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
......@@ -313,6 +319,18 @@ void ProjectExplorerPlugin::testGnuMakeParserParsing_data()
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("make warning")
<< QStringList()
<< QString::fromLatin1("make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.")
<< OutputParserTester::STDERR
<< QString() << QString()
<< (QList<Task>()
<< Task(Task::Warning,
QString::fromLatin1("jobserver unavailable: using -j1. Add `+' to parent make rule."),
Utils::FileName(), -1,
Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)))
<< QString()
<< QStringList();
QTest::newRow("pass-trough note")
<< QStringList()
<< QString::fromLatin1("/home/dev/creator/share/qtcreator/dumper/dumper.cpp:1079: note: initialized from here")
......
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