forked from qt-creator/qt-creator
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 <tim.jenssen@qt.io>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user