forked from qt-creator/qt-creator
ProjectExplorer: Store BuildTargetInfo in RunControl directly
Target might go away... Change-Id: Icbe040b030148a75e84f89b1ea47867f7ab18519 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -326,6 +326,7 @@ public:
|
||||
QPointer<RunConfiguration> runConfiguration; // Not owned. Avoid use.
|
||||
QString buildKey;
|
||||
Core::Id runConfigId;
|
||||
BuildTargetInfo buildTargetInfo;
|
||||
Kit *kit = nullptr; // Not owned.
|
||||
QPointer<Target> target; // Not owned.
|
||||
QPointer<Project> project; // Not owned.
|
||||
@@ -369,6 +370,9 @@ void RunControl::setTarget(Target *target)
|
||||
QTC_CHECK(!d->target);
|
||||
d->target = target;
|
||||
|
||||
if (!d->buildKey.isEmpty())
|
||||
d->buildTargetInfo = target->buildTarget(d->buildKey);
|
||||
|
||||
delete d->outputFormatter;
|
||||
d->outputFormatter = OutputFormatterFactory::createFormatter(target);
|
||||
if (!d->outputFormatter)
|
||||
@@ -902,12 +906,12 @@ QString RunControl::buildKey() const
|
||||
|
||||
FilePath RunControl::targetFilePath() const
|
||||
{
|
||||
return d->target->buildTarget(d->buildKey).targetFilePath;
|
||||
return d->buildTargetInfo.targetFilePath;
|
||||
}
|
||||
|
||||
FilePath RunControl::projectFilePath() const
|
||||
{
|
||||
return d->target->buildTarget(d->buildKey).projectFilePath;
|
||||
return d->buildTargetInfo.projectFilePath;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user