diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2009-12-09 13:54:46 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2009-12-09 18:39:03 +0100 |
commit | ec025c6dbf1b3c9b6ff4ac7859d61f03b35c21f4 (patch) | |
tree | 5e3d5b2a0fcbd4928826466e59394a43c8b1b0d0 /src/plugins/projectexplorer/msvcparser.cpp | |
parent | a0abde6306571fb7f12fe1d176cec1c8dba4d358 (diff) | |
download | qt-creator-ec025c6dbf1b3c9b6ff4ac7859d61f03b35c21f4.tar.gz |
Rework Build Parser handling
* Rework IBuildParser:
* Remove name() method.
* Remove enterDirectory and leaveDirectory signals.
* Allow chaining of parsers.
* Rename IBuildParser to IOutputParser.
* Implement GnuMakeParser.
* Remove entering/leaving directory related code from all other parsers
* Move filename fixup heuristic based on entering/leaving directory
massages from gnumake here from AbstractMakeStep.
* Add outputParser method to ToolChain: This removes the need to map
toolchains to BuildParser names in the BuildSteps.
* Enhance AbstractProcessStep to accept a IOutputParser to parse its output.
* Remove AbstractMakeStep.
* Set the appropriate Parsers in all classes deriving from AbstractProcessStep
and append the ToolChain's parser to the parser chain.
* Remove BuildParserFactories: There is no more need for them.
* Remove constants used to identify the BuildParsers.
* Clean up some names:
* Replace stdOut with stdOutput.
* Replace addToTaskWindow with addTask and addToOutputWindow with
addOutput. Do this wherever it is not yet clear that this will end up
in the Task/Output window.
Reviewed-by: dt
Diffstat (limited to 'src/plugins/projectexplorer/msvcparser.cpp')
-rw-r--r-- | src/plugins/projectexplorer/msvcparser.cpp | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index df8996f968..9d8110725c 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -30,9 +30,6 @@ #include "msvcparser.h" #include "projectexplorerconstants.h" -#include <QtCore/QStringList> -#include <QtCore/QDir> - using namespace ProjectExplorer; MsvcParser::MsvcParser() @@ -43,26 +40,15 @@ MsvcParser::MsvcParser() m_linkRegExp.setMinimal(true); } -QString MsvcParser::name() const -{ - return QLatin1String(ProjectExplorer::Constants::BUILD_PARSER_MSVC); -} - -void MsvcParser::stdError(const QString & line) -{ - Q_UNUSED(line) - //do nothing -} - -void MsvcParser::stdOutput(const QString & line) +void MsvcParser::stdOutput(const QString &line) { QString lne = line.trimmed(); if (m_compileRegExp.indexIn(lne) > -1 && m_compileRegExp.numCaptures() == 4) { - emit addToTaskWindow(TaskWindow::Task(toType(m_compileRegExp.cap(3).toInt()) /* task type */, - m_compileRegExp.cap(4) /* description */, - m_compileRegExp.cap(1) /* filename */, - m_compileRegExp.cap(2).toInt() /* linenumber */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(TaskWindow::Task(toType(m_compileRegExp.cap(3).toInt()) /* task type */, + m_compileRegExp.cap(4) /* description */, + m_compileRegExp.cap(1) /* filename */, + m_compileRegExp.cap(2).toInt() /* linenumber */, + Constants::TASK_CATEGORY_COMPILE)); return; } if (m_linkRegExp.indexIn(lne) > -1 && m_linkRegExp.numCaptures() == 3) { @@ -70,13 +56,14 @@ void MsvcParser::stdOutput(const QString & line) if (fileName.contains(QLatin1String("LINK"), Qt::CaseSensitive)) fileName.clear(); - emit addToTaskWindow(TaskWindow::Task(toType(m_linkRegExp.cap(2).toInt()) /* task type */, - m_linkRegExp.cap(3) /* description */, - fileName /* filename */, - -1 /* line number */, - Constants::TASK_CATEGORY_COMPILE)); + emit addTask(TaskWindow::Task(toType(m_linkRegExp.cap(2).toInt()) /* task type */, + m_linkRegExp.cap(3) /* description */, + fileName /* filename */, + -1 /* line number */, + Constants::TASK_CATEGORY_COMPILE)); return; } + IOutputParser::stdError(line); } TaskWindow::TaskType MsvcParser::toType(int number) |