forked from qt-creator/qt-creator
Kit: Add createOutputParser method
Which asks each KitInformation for their parser, thus currently creating a toolchain + qt chain if that is applicable. Remove all code that does that by hand from various buildsteps/buildconfigurations. Change-Id: I79a07ffd1dbe9a43bdbc838bc0098071aa412009 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -125,20 +125,6 @@ void CMakeBuildConfiguration::setBuildDirectory(const QString &buildDirectory)
|
||||
emit environmentChanged();
|
||||
}
|
||||
|
||||
ProjectExplorer::IOutputParser *CMakeBuildConfiguration::createOutputParser() const
|
||||
{
|
||||
ProjectExplorer::IOutputParser *parserchain = new ProjectExplorer::GnuMakeParser;
|
||||
|
||||
int versionId = QtSupport::QtKitInformation::qtVersionId(target()->kit());
|
||||
if (versionId >= 0)
|
||||
parserchain->appendOutputParser(new QtSupport::QtParser);
|
||||
|
||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
|
||||
if (tc)
|
||||
parserchain->appendOutputParser(tc->outputParser());
|
||||
return parserchain;
|
||||
}
|
||||
|
||||
/*!
|
||||
\class CMakeBuildConfigurationFactory
|
||||
*/
|
||||
|
||||
@@ -58,8 +58,6 @@ public:
|
||||
|
||||
QVariantMap toMap() const;
|
||||
|
||||
ProjectExplorer::IOutputParser *createOutputParser() const;
|
||||
|
||||
BuildType buildType() const;
|
||||
|
||||
bool useNinja() const;
|
||||
|
||||
@@ -201,12 +201,9 @@ bool MakeStep::init()
|
||||
pp->setArguments(arguments);
|
||||
|
||||
setOutputParser(new ProjectExplorer::GnuMakeParser());
|
||||
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
|
||||
if (version)
|
||||
appendOutputParser(new QtSupport::QtParser);
|
||||
if (tc)
|
||||
appendOutputParser(tc->outputParser());
|
||||
IOutputParser *parser = target()->kit()->createOutputParser();
|
||||
if (parser)
|
||||
appendOutputParser(parser);
|
||||
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
|
||||
Reference in New Issue
Block a user