From 2c4023b5dc8f1d92474e973a483af52939d17cb7 Mon Sep 17 00:00:00 2001 From: dt Date: Thu, 5 Feb 2009 17:19:27 +0100 Subject: [PATCH] Fixes: Hopefully parse more gcc/ld errors. Details: If we know don't parse some errors, then i'd like to know. --- src/plugins/qt4projectmanager/gccparser.cpp | 47 ++++++--------------- src/plugins/qt4projectmanager/gccparser.h | 1 - 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/src/plugins/qt4projectmanager/gccparser.cpp b/src/plugins/qt4projectmanager/gccparser.cpp index 1d43e77f574..b71a3362f55 100644 --- a/src/plugins/qt4projectmanager/gccparser.cpp +++ b/src/plugins/qt4projectmanager/gccparser.cpp @@ -46,14 +46,12 @@ GccParser::GccParser() m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$"); m_regExpIncluded.setMinimal(true); - m_regExpLinker.setPattern("^(\\S+)\\(\\S+\\):\\s(.+)$"); + m_regExpLinker.setPattern("^(\\S*)\\(\\S+\\):\\s(.+)$"); m_regExpLinker.setMinimal(true); //make[4]: Entering directory `/home/kkoehne/dev/ide-explorer/src/plugins/qtscripteditor' m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$"); m_makeDir.setMinimal(true); - - m_linkIndent = false; } QString GccParser::name() const @@ -76,7 +74,15 @@ void GccParser::stdOutput(const QString & line) void GccParser::stdError(const QString & line) { QString lne = line.trimmed(); - if (m_regExp.indexIn(lne) > -1) { + if (m_regExpLinker.indexIn(lne) > -1) { + QString description = m_regExpLinker.cap(2); + emit addToTaskWindow( + m_regExpLinker.cap(1), //filename + ProjectExplorer::BuildParserInterface::Error, + -1, //linenumber + description); + //qDebug()<<"m_regExpLinker"< -1) { ProjectExplorer::BuildParserInterface::PatternType type; if (m_regExp.cap(5) == "warning") type = ProjectExplorer::BuildParserInterface::Warning; @@ -86,17 +92,14 @@ void GccParser::stdError(const QString & line) type = ProjectExplorer::BuildParserInterface::Unknown; QString description = m_regExp.cap(6); - if (m_linkIndent) - description.prepend(QLatin1String("-> ")); - //qDebug()< -1) { emit addToTaskWindow( m_regExpIncluded.cap(1), //filename @@ -104,29 +107,7 @@ void GccParser::stdError(const QString & line) m_regExpIncluded.cap(2).toInt(), //linenumber lne //description ); - } else if (m_regExpLinker.indexIn(lne) > -1) { - ProjectExplorer::BuildParserInterface::PatternType type = ProjectExplorer::BuildParserInterface::Error; - QString description = m_regExpLinker.cap(2); - if (lne.endsWith(QLatin1Char(':'))) { - m_linkIndent = true; - } else if (m_linkIndent) { - description.prepend(QLatin1String("-> ")); - type = ProjectExplorer::BuildParserInterface::Unknown; - } - emit addToTaskWindow( - m_regExpLinker.cap(1), //filename - type, - -1, //linenumber - description); + //qDebug()<<"m_regExpInclude"<