From 7745eacc7afae4acf3e07325ab01cf6e6821037c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 7 Apr 2020 13:49:34 +0200 Subject: Output parsers: Generalize the search directory concept All parsers can now have search directories, not just the GnuMakeParser. This allows us to get rid of the "task mangling", removing another instance where the order of parsers in the chain mattered. Task-number: QTCREATORBUG-22665 Change-Id: Id0d55522ae6800afd9f50ff36546224b0d8bb382 Reviewed-by: hjk --- src/plugins/qmakeprojectmanager/qmakemakestep.cpp | 2 +- src/plugins/qmakeprojectmanager/qmakeparser.cpp | 2 +- src/plugins/qmakeprojectmanager/qmakestep.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/qmakeprojectmanager') diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp index 118df07c11d..f3c85b388c1 100644 --- a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp @@ -171,7 +171,7 @@ bool QmakeMakeStep::init() IOutputParser *parser = target()->kit()->createOutputParser(); if (parser) appendOutputParser(parser); - outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory()); + outputParser()->addSearchDir(pp->effectiveWorkingDirectory()); appendOutputParser(new QMakeParser); // make may cause qmake to be run, add last to make sure // it has a low priority. diff --git a/src/plugins/qmakeprojectmanager/qmakeparser.cpp b/src/plugins/qmakeprojectmanager/qmakeparser.cpp index 46ad10a0a00..bbc711e9582 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparser.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparser.cpp @@ -61,7 +61,7 @@ void QMakeParser::stdError(const QString &line) type = Task::Error; emit addTask(BuildSystemTask(type, description, - FilePath::fromUserInput(fileName), + absoluteFilePath(FilePath::fromUserInput(fileName)), m_error.cap(2).toInt() /* line */), 1); return; diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 320a786af6c..2faaa4e0cbf 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -338,7 +338,7 @@ void QMakeStep::runNextCommand() case State::RUN_MAKE_QMAKE_ALL: { auto *parser = new GnuMakeParser; - parser->setWorkingDirectory(processParameters()->workingDirectory()); + parser->addSearchDir(processParameters()->workingDirectory()); setOutputParser(parser); m_nextState = State::POST_PROCESS; startOneCommand(m_makeCommand); -- cgit v1.2.3