From 1403cd7f43937dc6a549fac7dec56d2a7a4a6dba Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 25 Jan 2016 13:24:13 +0100 Subject: [PATCH] ProjectExplorer: Use environment from Runnable ... instead of re-fetching it from the EnvironmentAspect. Change-Id: Iab25d7d828ac3811eebc8bb149f53e61299e500e Reviewed-by: Orgad Shaneh Reviewed-by: Tobias Hunger --- .../projectexplorer/localapplicationruncontrol.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/plugins/projectexplorer/localapplicationruncontrol.cpp b/src/plugins/projectexplorer/localapplicationruncontrol.cpp index b7e92e4e165..b12540d1120 100644 --- a/src/plugins/projectexplorer/localapplicationruncontrol.cpp +++ b/src/plugins/projectexplorer/localapplicationruncontrol.cpp @@ -33,7 +33,6 @@ #include #include -#include #include @@ -66,12 +65,6 @@ LocalApplicationRunControl::LocalApplicationRunControl(RunConfiguration *rc, Cor : RunControl(rc, mode) { setIcon(Icons::RUN_SMALL); - EnvironmentAspect *environment = rc->extraAspect(); - Utils::Environment env; - if (environment) - env = environment->environment(); - m_applicationLauncher.setEnvironment(env); - connect(&m_applicationLauncher, &ApplicationLauncher::appendMessage, this, static_cast(&RunControl::appendMessage)); connect(&m_applicationLauncher, &ApplicationLauncher::processStarted, @@ -97,6 +90,7 @@ void LocalApplicationRunControl::start() m_running = true; QString msg = tr("Starting %1...").arg(QDir::toNativeSeparators(m_runnable.executable)) + QLatin1Char('\n'); appendMessage(msg, Utils::NormalMessageFormat); + m_applicationLauncher.setEnvironment(m_runnable.environment); m_applicationLauncher.start(m_runnable.runMode, m_runnable.executable, m_runnable.commandLineArguments); setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID())); }