WorkingDirectoryAspect: Expand macros first, then expand variables

Expanding variables includes calling cleanPath on the input. At that
point macros like %{buildDir} need to be expanded already or working
directories like "%{buildDir}/../test" will get turned into "test",
which is not what a user expects to happen.

Change-Id: I61e6604a621f632ddee87766d38ab3c863bdb9dc
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-06-24 13:47:39 +02:00
parent 9db6897e55
commit 8501ffbb36

View File

@@ -218,9 +218,9 @@ FileName WorkingDirectoryAspect::workingDirectory() const
auto envAspect = runConfiguration()->extraAspect<EnvironmentAspect>(); auto envAspect = runConfiguration()->extraAspect<EnvironmentAspect>();
const Utils::Environment env = envAspect ? envAspect->environment() const Utils::Environment env = envAspect ? envAspect->environment()
: Utils::Environment::systemEnvironment(); : Utils::Environment::systemEnvironment();
return FileName::fromString( const QString macroExpanded
runConfiguration()->macroExpander()->expandProcessArgs( = runConfiguration()->macroExpander()->expandProcessArgs(m_workingDirectory.toUserOutput());
PathChooser::expandedDirectory(m_workingDirectory.toString(), env, QString()))); return FileName::fromString(PathChooser::expandedDirectory(macroExpanded, env, QString()));
} }
FileName WorkingDirectoryAspect::defaultWorkingDirectory() const FileName WorkingDirectoryAspect::defaultWorkingDirectory() const