forked from qt-creator/qt-creator
EnvironmentItem: Introduce operation enumeration
Extend operations to handle prepend/append which can be optionally
determined by diff(). This allows cleanly implementing
the MSVC toolchain setup.
Amends c7a84634fd
Change-Id: Ida08d8f5e00cf5f78c20ea8d08c531b1ed22c015
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -4046,7 +4046,7 @@ void GdbEngine::setEnvironmentVariables()
|
||||
Environment sysEnv = Environment::systemEnvironment();
|
||||
Environment runEnv = runParameters().inferior.environment;
|
||||
foreach (const EnvironmentItem &item, sysEnv.diff(runEnv)) {
|
||||
if (item.unset)
|
||||
if (item.operation == EnvironmentItem::Unset)
|
||||
runCommand({"unset environment " + item.name});
|
||||
else
|
||||
runCommand({"-gdb-set environment " + item.name + '='
|
||||
|
||||
Reference in New Issue
Block a user