ProjectExplorer: Streamline access to buildDirectoryTemplate data

There's only one kind of use, in the context of BuildConfiguration.

Change-Id: I09628ff443ef08e28738125a614c17d5d979189b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-08-24 08:34:32 +02:00
parent cd3c2fdc5b
commit 22ecef0444
15 changed files with 89 additions and 177 deletions

View File

@@ -49,7 +49,6 @@
#include <projectexplorer/makestep.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectmacroexpander.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
@@ -106,10 +105,8 @@ FilePath QmakeBuildConfiguration::shadowBuildDirectory(const FilePath &proFilePa
return {};
const QString projectName = proFilePath.completeBaseName();
ProjectMacroExpander expander(proFilePath, projectName, k, suffix, buildType);
FilePath projectDir = Project::projectDirectory(proFilePath);
QString buildPath = expander.expand(ProjectExplorerPlugin::buildDirectoryTemplate());
return projectDir.resolvePath(buildPath);
return BuildConfiguration::buildDirectoryFromTemplate(
Project::projectDirectory(proFilePath), proFilePath, projectName, k, suffix, buildType);
}
const char BUILD_CONFIGURATION_KEY[] = "Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration";