Handle environment variables when starting an application

* Handle environment variables in workdir, executable name as
   well as arguments when starting an application
 * Cover both debugger and normal application starts
This commit is contained in:
Tobias Hunger
2010-09-24 12:36:24 +02:00
parent e9f412c3ed
commit 50f9165b05
2 changed files with 12 additions and 10 deletions

View File

@@ -147,10 +147,10 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
QTC_ASSERT(rc, return sp);
sp.startMode = StartInternal;
sp.executable = rc->executable();
sp.environment = rc->environment().toStringList();
sp.workingDirectory = rc->workingDirectory();
sp.processArgs = rc->commandLineArguments();
sp.workingDirectory = rc->environment().expandVariables(rc->workingDirectory());
sp.executable = rc->environment().searchInPath(rc->executable(), QStringList() << sp.workingDirectory);
sp.processArgs = rc->environment().expandVariables(rc->commandLineArguments());
sp.toolChainType = rc->toolChainType();
sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
sp.dumperLibrary = rc->dumperLibrary();