ProjectExplorer: Make BuildSystem:Name variable available

... for use in the default build dir template.

Task-number: QTCREATORBUG-26147
Change-Id: I1a32d60e0d5e2db514ac315c48c615c55ccda51f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2022-06-03 13:32:49 +02:00
parent 8d659cb7db
commit 21c215f83c
9 changed files with 19 additions and 13 deletions

View File

@@ -604,7 +604,8 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
const QString &projectName,
const Kit *kit,
const QString &bcName,
BuildType buildType)
BuildType buildType,
const QString &buildSystem)
{
MacroExpander exp;
@@ -630,6 +631,10 @@ FilePath BuildConfiguration::buildDirectoryFromTemplate(const FilePath &projectD
QCoreApplication::translate(
"ProjectExplorer", "Name of the project's active build configuration"),
[bcName] { return bcName; });
exp.registerVariable("BuildSystem:Name",
QCoreApplication::translate(
"ProjectExplorer", "Name of the project's active build system"),
[buildSystem] { return buildSystem; });
exp.registerVariable("CurrentBuild:Type",
QCoreApplication::translate("ProjectExplorer", "Type of current build"),
[buildType] { return buildTypeName(buildType); }, false);