diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp index ec3cf9894f9..3464c033f64 100644 --- a/src/plugins/projectexplorer/buildconfiguration.cpp +++ b/src/plugins/projectexplorer/buildconfiguration.cpp @@ -104,9 +104,12 @@ void BuildConfiguration::ctor() expander->registerVariable("buildDir", tr("Build directory"), [this] { return buildDirectory().toUserOutput(); }); - expander->registerVariable(Constants::VAR_CURRENTBUILD_NAME, - QCoreApplication::translate("ProjectExplorer", "Name of current build"), + expander->registerVariable(Constants::VAR_CURRENTBUILD_NAME, tr("Name of current build"), [this] { return displayName(); }, false); + + expander->registerPrefix(Constants::VAR_CURRENTBUILD_ENV, + tr("Variables in the current build environment"), + [this](const QString &var) { return environment().value(var); }); } Utils::FileName BuildConfiguration::buildDirectory() const diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index dab1f51f25c..c1c078b6082 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -244,6 +244,7 @@ const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName"; const char VAR_CURRENTKIT_ID[] = "CurrentKit:Id"; const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name"; const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type"; +const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env"; const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name"; const char VAR_CURRENTRUN_EXECUTABLE_PREFIX[] = "CurrentRun:Executable"; const char VAR_CURRENTDEVICE_HOSTADDRESS[] = "CurrentDevice:HostAddress";