diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-07-09 14:11:21 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-07-10 07:55:23 +0000 |
commit | c2bba5bbd4b48999a2c91e04afdcdd85f9ca5353 (patch) | |
tree | 06df948fb42d11fc49d0a54d128ba002618eb759 | |
parent | 4c144b45abdab3b6f4b0609cfc56e0463c13d32d (diff) |
Expand variables in external tool environment
Change-Id: I98fc942f25309bba1b4573b0544418d3b4b836c8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | src/plugins/coreplugin/externaltool.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/externaltool.cpp b/src/plugins/coreplugin/externaltool.cpp index 58abcae5b1..08e3ecc29b 100644 --- a/src/plugins/coreplugin/externaltool.cpp +++ b/src/plugins/coreplugin/externaltool.cpp @@ -35,6 +35,7 @@ #include <app/app_version.h> +#include <utils/algorithm.h> #include <utils/fileutils.h> #include <utils/macroexpander.h> #include <utils/qtcassert.h> @@ -574,7 +575,11 @@ bool ExternalToolRunner::resolve() MacroExpander *expander = globalMacroExpander(); - m_resolvedEnvironment.modify(m_tool->environment()); + QList<EnvironmentItem> expandedEnvironment + = Utils::transform(m_tool->environment(), [expander](const EnvironmentItem &item) { + return EnvironmentItem(item.name, expander->expand(item.value), item.operation); + }); + m_resolvedEnvironment.modify(expandedEnvironment); { // executable |