Commit 4672624b authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ProjectExplorer: Add CurrentBuild:Env to the MacroExpander



Make BuildConfigurations provide %{CurrentBuild:Env:VARNAME} via the
macro expander infrastructure.

Change-Id: I1bed8c6aa9003c361a07fa69a5a3840f7a4e0d17
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent fcc9ccaf
......@@ -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
......
......@@ -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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment