forked from qt-creator/qt-creator
OutputFormatter: Take ownership of the line parsers
For symmetry with IOutputParser. Task-number: QTCREATORBUG-22665 Change-Id: I92e93b32e87ff4f3fa163a2d2fe13768e56bfa24 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -288,7 +288,6 @@ public:
|
||||
q = nullptr;
|
||||
qDeleteAll(m_workers);
|
||||
m_workers.clear();
|
||||
qDeleteAll(outputParsers);
|
||||
}
|
||||
|
||||
Q_ENUM(RunControlState)
|
||||
@@ -333,7 +332,6 @@ public:
|
||||
Kit *kit = nullptr; // Not owned.
|
||||
QPointer<Target> target; // Not owned.
|
||||
QPointer<Project> project; // Not owned.
|
||||
QList<Utils::OutputLineParser *> outputParsers;
|
||||
std::function<bool(bool*)> promptToStop;
|
||||
std::vector<RunWorkerFactory> m_factories;
|
||||
|
||||
@@ -384,9 +382,6 @@ void RunControl::setTarget(Target *target)
|
||||
d->buildEnvironment = bc->environment();
|
||||
}
|
||||
|
||||
QTC_CHECK(d->outputParsers.isEmpty());
|
||||
d->outputParsers = OutputFormatterFactory::createFormatters(target);
|
||||
|
||||
setKit(target->kit());
|
||||
d->project = target->project();
|
||||
}
|
||||
@@ -828,9 +823,9 @@ void RunControlPrivate::showError(const QString &msg)
|
||||
q->appendMessage(msg + '\n', ErrorMessageFormat);
|
||||
}
|
||||
|
||||
QList<Utils::OutputLineParser *> RunControl::outputParsers() const
|
||||
QList<Utils::OutputLineParser *> RunControl::createOutputParsers() const
|
||||
{
|
||||
return d->outputParsers;
|
||||
return OutputFormatterFactory::createFormatters(target());
|
||||
}
|
||||
|
||||
Core::Id RunControl::runMode() const
|
||||
|
||||
Reference in New Issue
Block a user