aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2018-07-09 14:12:18 +0200
committerEike Ziller <eike.ziller@qt.io>2018-07-10 07:55:30 +0000
commit91030f807a38ba135f3ffc19d498024164d5692c (patch)
tree4195fd4489a3c8d8f4f55ef7f1d1393c9b64c447
parentc2bba5bbd4b48999a2c91e04afdcdd85f9ca5353 (diff)
Add %{CurrentBuild:Env} to global environment
%{CurrentBuild:Name} and %{CurrentBuild:Type} are there too. Change-Id: I06b49da61cd689b54be87333d7fa3f212ebf1762 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index d4cd718659..56b30b3a99 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(); };