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:
@@ -34,6 +34,7 @@
|
||||
#include "kitmanager.h"
|
||||
#include "project.h"
|
||||
#include "toolchainmanager.h"
|
||||
#include "ioutputparser.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -363,6 +364,23 @@ void Kit::addToEnvironment(Utils::Environment &env) const
|
||||
ki->addToEnvironment(this, env);
|
||||
}
|
||||
|
||||
IOutputParser *Kit::createOutputParser() const
|
||||
{
|
||||
IOutputParser *last = 0;
|
||||
IOutputParser *first = 0;
|
||||
QList<KitInformation *> infoList = KitManager::instance()->kitInformation();
|
||||
foreach (KitInformation *ki, infoList) {
|
||||
IOutputParser *next = ki->createOutputParser(this);
|
||||
if (!first)
|
||||
first = next;
|
||||
if (last && next)
|
||||
last->appendOutputParser(next);
|
||||
if (next)
|
||||
last = next;
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
QString Kit::toHtml()
|
||||
{
|
||||
QString rc;
|
||||
|
||||
Reference in New Issue
Block a user