From e632c9fcb29a4cd55201d28300b7cc76477eec53 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Thu, 1 Apr 2010 11:18:02 +0200 Subject: [PATCH] Debugger/MinGW: Set environment correctly. Extend the environment instead of clobbering it with the Python setup. Reviewed-by: dt --- src/plugins/debugger/gdb/gdbengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index aa5b5afe7e9..792bd3b18ed 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -4041,13 +4041,14 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb, const QStr gdbArgs += args; #ifdef Q_OS_WIN // Set python path. By convention, python is located below gdb executable. + // Extend the environment set on the process in startAdapter(). const QFileInfo fi(location); bool foundPython = false; if (fi.isAbsolute()) { const QString winPythonVersion = QLatin1String(winPythonVersionC); const QDir dir = fi.absoluteDir(); if (dir.exists(winPythonVersion)) { - QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); + QProcessEnvironment environment = m_gdbProc.processEnvironment(); const QString pythonPathVariable = QLatin1String("PYTHONPATH"); // Check for existing values. if (environment.contains(pythonPathVariable)) { -- GitLab