forked from qt-creator/qt-creator
ProjectExplorer: Introduce Target::buildTarget(buildKey)
A convenience wrapper for applicationTargets().buildTargetInfo(buildKey), the only context using the BuildTargetInfoList member. Also, only one of the free comparison functions is ever used, only in one place. Inline it there. Change-Id: I7565e9d51d429af34352649e235243e5b3328fe9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -347,7 +347,7 @@ DeploymentData Target::deploymentData() const
|
||||
|
||||
void Target::setApplicationTargets(const BuildTargetInfoList &appTargets)
|
||||
{
|
||||
if (d->m_appTargets != appTargets) {
|
||||
if (appTargets.list.toSet() != d->m_appTargets.list.toSet()) {
|
||||
d->m_appTargets = appTargets;
|
||||
emit applicationTargetsChanged();
|
||||
}
|
||||
@@ -358,6 +358,13 @@ BuildTargetInfoList Target::applicationTargets() const
|
||||
return d->m_appTargets;
|
||||
}
|
||||
|
||||
BuildTargetInfo Target::buildTarget(const QString &buildKey) const
|
||||
{
|
||||
return Utils::findOrDefault(d->m_appTargets.list, [&buildKey](const BuildTargetInfo &ti) {
|
||||
return ti.buildKey == buildKey;
|
||||
});
|
||||
}
|
||||
|
||||
QList<ProjectConfiguration *> Target::projectConfigurations() const
|
||||
{
|
||||
QList<ProjectConfiguration *> result;
|
||||
|
||||
Reference in New Issue
Block a user