Expand variables in external tool environment

Change-Id: I98fc942f25309bba1b4573b0544418d3b4b836c8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2018-07-09 14:11:21 +02:00
parent 4c144b45ab
commit c2bba5bbd4

View File

@@ -35,6 +35,7 @@
#include <app/app_version.h> #include <app/app_version.h>
#include <utils/algorithm.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/macroexpander.h> #include <utils/macroexpander.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -574,7 +575,11 @@ bool ExternalToolRunner::resolve()
MacroExpander *expander = globalMacroExpander(); 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 // executable