From 91030f807a38ba135f3ffc19d498024164d5692c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 9 Jul 2018 14:12:18 +0200 Subject: [PATCH] Add %{CurrentBuild:Env} to global environment %{CurrentBuild:Name} and %{CurrentBuild:Type} are there too. Change-Id: I06b49da61cd689b54be87333d7fa3f212ebf1762 Reviewed-by: Orgad Shaneh Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/projectexplorer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index d4cd7186598..56b30b3a996 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1497,6 +1497,13 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return BuildConfiguration::buildTypeName(type); }); + expander->registerPrefix(Constants::VAR_CURRENTBUILD_ENV, + BuildConfiguration::tr("Variables in the current build environment"), + [](const QString &var) { + if (BuildConfiguration *bc = activeBuildConfiguration()) + return bc->environment().value(var); + return QString(); + }); QString fileDescription = tr("File where current session is saved."); auto fileHandler = [] { return SessionManager::sessionNameToFileName(SessionManager::activeSession()).toString(); };