ProjectExplorer: Introduce an Targer::activeBuildKey()

... redirecting to activeRunConfiguration()->buildKey()

This will allow the user code side to be moved closer to a setup
that will allow to shift the build data stored in project nodes
to the build system.

Change-Id: Icdf03e77bf61ee03b3a16855ac67652c205402fa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-03-31 20:22:44 +02:00
parent c2627298d8
commit f83347ec00
2 changed files with 11 additions and 0 deletions

View File

@@ -238,6 +238,15 @@ BuildTargetInfo Target::buildTarget(const QString &buildKey) const
return buildSystem()->buildTarget(buildKey);
}
QString Target::activeBuildKey() const
{
// Should not happen. If it does, return a buildKey that wont be found in
// the project tree, so that the project()->findNodeForBuildKey(buildKey)
// returns null.
QTC_ASSERT(d->m_activeRunConfiguration, return QString(QChar(0)));
return d->m_activeRunConfiguration->buildKey();
}
Core::Id Target::id() const
{
return d->m_kit->id();

View File

@@ -123,6 +123,8 @@ public:
DeploymentData buildSystemDeploymentData() const;
BuildTargetInfo buildTarget(const QString &buildKey) const;
QString activeBuildKey() const; // Build key of active run configuaration
signals:
void targetEnabled(bool);
void iconChanged();