Commit 59d827c6 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Fix QTCREATORBUG-904 and 905

 * Also handle TeamBuilder issues similar to QTCB-904
parent fd298157
......@@ -59,9 +59,26 @@ GccParser::GccParser()
void GccParser::stdError(const QString &line)
{
QString lne = line.trimmed();
if (lne.startsWith(QLatin1String("collect2:")) ||
// Blacklist some lines to not handle them:
if (lne.startsWith(QLatin1String("TeamBuilder ")) ||
lne.startsWith(QLatin1String("distcc["))) {
IOutputParser::stdError(line);
return;
}
// Handle linker issues:
if (lne.startsWith(QLatin1String("ld: fatal: "))) {
QString description = lne.mid(11);
emit addTask(Task(Task::Error, description, QString(), -1, Constants::TASK_CATEGORY_COMPILE));
return;
} else if (lne.startsWith(QLatin1String("ld: warning: "))) {
QString description = lne.mid(13);
emit addTask(Task(Task::Warning, description, QString(), -1, Constants::TASK_CATEGORY_COMPILE));
return;
} else if (lne.startsWith(QLatin1String("collect2:")) ||
lne.startsWith(QLatin1String("ERROR:")) ||
lne == QLatin1String("* cpp failed")) {
// Handle misc. strange lines:
emit addTask(Task(Task::Error,
lne /* description */,
QString() /* filename */,
......@@ -342,6 +359,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
QString(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("ld fatal")
<< QString::fromLatin1("ld: fatal: Symbol referencing errors. No output written to testproject")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Error,
QLatin1String("Symbol referencing errors. No output written to testproject"),
QString(), -1,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
QTest::newRow("Teambuilder issues")
<< QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...")
<< OutputParserTester::STDERR
......
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