Commit 6f085665 authored by Nicolas Arnaud-Cormos's avatar Nicolas Arnaud-Cormos Committed by Tobias Hunger
Browse files

Fix issues type with ldparser.



Sometime, in the most general case, the message is a warning, and not an error.
Two cases:
 * linker returning a message like this: 'filename: warning: description'
 * uic returns messages like this: 'Warning: description'

Change-Id: I2babe1de2753ea8b2871419f1b1405eb7ae73d48
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 7986fbd0
......@@ -682,6 +682,28 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QLatin1String("cns5k_ins_parser_tests.cpp"), -1,
categoryCompile))
<< QString();
QTest::newRow("uic warning")
<< QString::fromLatin1("mainwindow.ui: Warning: The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'.")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("The name 'pushButton' (QPushButton) is already in use, defaulting to 'pushButton1'."),
QLatin1String("mainwindow.ui"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("libimf warning")
<< QString::fromLatin1("libimf.so: warning: warning: feupdateenv is not implemented and will always fail")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Warning,
QLatin1String("warning: feupdateenv is not implemented and will always fail"),
QLatin1String("libimf.so"), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
}
void ProjectExplorerPlugin::testGccOutputParsers()
......
......@@ -106,6 +106,10 @@ void LdParser::stdError(const QString &line)
description.startsWith(QLatin1String("instantiated from ")) ||
description.startsWith(QLatin1String("In ")))
task.type = Task::Unknown;
if (description.startsWith(QLatin1String("warning: "), Qt::CaseInsensitive)) {
task.type = Task::Warning;
task.description = description.mid(9);
}
emit addTask(task);
return;
......
Supports Markdown
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