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:
hjk
2019-02-18 18:24:10 +01:00
parent 7f4c6e38bf
commit ea9dad4719
9 changed files with 18 additions and 26 deletions

View File

@@ -97,7 +97,7 @@ QString CMakeRunConfiguration::disabledReason() const
void CMakeRunConfiguration::updateTargetInformation()
{
BuildTargetInfo bti = target()->applicationTargets().buildTargetInfo(buildKey());
BuildTargetInfo bti = buildTargetInfo();
aspect<ExecutableAspect>()->setExecutable(bti.targetFilePath);
aspect<WorkingDirectoryAspect>()->setDefaultWorkingDirectory(bti.workingDirectory);
aspect<LocalEnvironmentAspect>()->buildEnvironmentHasChanged();