forked from qt-creator/qt-creator
PythonEditor: Ensure to set environment
Change-Id: Ie216b28b7effb2d44ba507dffa07bb7f463030e7 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -137,6 +137,7 @@ void PdbEngine::setupEngine()
|
|||||||
QStringList args = { bridge, scriptFile.fileName() };
|
QStringList args = { bridge, scriptFile.fileName() };
|
||||||
args.append(Utils::QtcProcess::splitArgs(runParameters().inferior.workingDirectory));
|
args.append(Utils::QtcProcess::splitArgs(runParameters().inferior.workingDirectory));
|
||||||
showMessage(_("STARTING ") + m_interpreter + QLatin1Char(' ') + args.join(QLatin1Char(' ')));
|
showMessage(_("STARTING ") + m_interpreter + QLatin1Char(' ') + args.join(QLatin1Char(' ')));
|
||||||
|
m_proc.setEnvironment(runParameters().debuggerEnvironment.toStringList());
|
||||||
m_proc.start(m_interpreter, args);
|
m_proc.start(m_interpreter, args);
|
||||||
|
|
||||||
if (!m_proc.waitForStarted()) {
|
if (!m_proc.waitForStarted()) {
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ private:
|
|||||||
QString m_interpreter;
|
QString m_interpreter;
|
||||||
QString m_mainScript;
|
QString m_mainScript;
|
||||||
QString m_commandLineArguments;
|
QString m_commandLineArguments;
|
||||||
|
Utils::Environment m_environment;
|
||||||
ApplicationLauncher::Mode m_runMode;
|
ApplicationLauncher::Mode m_runMode;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
};
|
};
|
||||||
@@ -1077,6 +1078,7 @@ PythonRunControl::PythonRunControl(PythonRunConfiguration *rc, Core::Id mode)
|
|||||||
m_mainScript = rc->mainScript();
|
m_mainScript = rc->mainScript();
|
||||||
m_runMode = rc->extraAspect<TerminalAspect>()->runMode();
|
m_runMode = rc->extraAspect<TerminalAspect>()->runMode();
|
||||||
m_commandLineArguments = rc->extraAspect<ArgumentsAspect>()->arguments();
|
m_commandLineArguments = rc->extraAspect<ArgumentsAspect>()->arguments();
|
||||||
|
m_environment = rc->extraAspect<EnvironmentAspect>()->environment();
|
||||||
|
|
||||||
connect(&m_applicationLauncher, &ApplicationLauncher::appendMessage,
|
connect(&m_applicationLauncher, &ApplicationLauncher::appendMessage,
|
||||||
this, &PythonRunControl::slotAppendMessage);
|
this, &PythonRunControl::slotAppendMessage);
|
||||||
@@ -1108,6 +1110,7 @@ void PythonRunControl::start()
|
|||||||
QtcProcess::addArgs(&r.commandLineArguments, m_commandLineArguments);
|
QtcProcess::addArgs(&r.commandLineArguments, m_commandLineArguments);
|
||||||
r.executable = m_interpreter;
|
r.executable = m_interpreter;
|
||||||
r.runMode = m_runMode;
|
r.runMode = m_runMode;
|
||||||
|
r.environment = m_environment;
|
||||||
m_applicationLauncher.start(r);
|
m_applicationLauncher.start(r);
|
||||||
|
|
||||||
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
setApplicationProcessHandle(ProcessHandle(m_applicationLauncher.applicationPID()));
|
||||||
|
|||||||
Reference in New Issue
Block a user