Use EnvironmentAspect to retrieve the environment

Change-Id: If878e22cc2715d05bb3e65ad908cd4fb5e21b03b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2013-01-29 18:00:30 +01:00
parent e837b48465
commit 47abeac15b
15 changed files with 134 additions and 36 deletions

View File

@@ -32,6 +32,7 @@
#include <remotelinux/remotelinuxrunconfiguration.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/localapplicationrunconfiguration.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h>
@@ -62,8 +63,11 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
sp.displayName = runConfiguration->displayName();
if (LocalApplicationRunConfiguration *rc1 =
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
ProjectExplorer::EnvironmentAspect *aspect
= runConfiguration->extraAspect<ProjectExplorer::EnvironmentAspect>();
sp.startMode = Analyzer::StartLocal;
sp.environment = rc1->environment();
if (aspect)
sp.environment = aspect->environment();
sp.workingDirectory = rc1->workingDirectory();
sp.debuggee = rc1->executable();
sp.debuggeeArgs = rc1->commandLineArguments();