Commit 325ed9a1 authored by Christian Stenger's avatar Christian Stenger

PythonEditor: Ensure to set environment

Change-Id: Ie216b28b7effb2d44ba507dffa07bb7f463030e7
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent d7b0c41c
......@@ -137,6 +137,7 @@ void PdbEngine::setupEngine()
QStringList args = { bridge, scriptFile.fileName() };
args.append(Utils::QtcProcess::splitArgs(runParameters().inferior.workingDirectory));
showMessage(_("STARTING ") + m_interpreter + QLatin1Char(' ') + args.join(QLatin1Char(' ')));
m_proc.setEnvironment(runParameters().debuggerEnvironment.toStringList());
m_proc.start(m_interpreter, args);
if (!m_proc.waitForStarted()) {
......
......@@ -405,6 +405,7 @@ private:
QString m_interpreter;
QString m_mainScript;
QString m_commandLineArguments;
Utils::Environment m_environment;
ApplicationLauncher::Mode m_runMode;
bool m_running;
};
......@@ -1077,6 +1078,7 @@ PythonRunControl::PythonRunControl(PythonRunConfiguration *rc, Core::Id mode)
m_mainScript = rc->mainScript();
m_runMode = rc->extraAspect<TerminalAspect>()->runMode();
m_commandLineArguments = rc->extraAspect<ArgumentsAspect>()->arguments();
m_environment = rc->extraAspect<EnvironmentAspect>()->environment();
connect(&m_applicationLauncher, &ApplicationLauncher::appendMessage,
this, &PythonRunControl::slotAppendMessage);
......@@ -1108,6 +1110,7 @@ void PythonRunControl::start()
QtcProcess::addArgs(&r.commandLineArguments, m_commandLineArguments);
r.executable = m_interpreter;
r.runMode = m_runMode;
r.environment = m_environment;
m_applicationLauncher.start(r);
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment