Utils: Introduce QtcProcess::controlEnvironment()

... and drop QtcProcess::removeEnvironment()

This shifts the meaning of the unqualified QtcProcess::environment()
to always refer to (possibly remote) "main" process this QtcProcess
wraps. The controlEnvironment is now referring to secondary helper
processes (if any...) typically(?) running on the host system.

This helps to avoid local/remote distinctions in some places.

Change-Id: Ib7cd15dd226617484b5358acd7deaed29e751883
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2022-05-09 15:02:23 +02:00
parent 9bf0efcbb9
commit e657bc8781
9 changed files with 36 additions and 48 deletions

View File

@@ -239,7 +239,7 @@ CommandLine DockerProcessImpl::fullLocalCommandLine(bool interactive)
args.append({"echo", s_pidMarker, "&&"});
const Environment &env = m_setup.m_remoteEnvironment;
const Environment &env = m_setup.m_environment;
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
args.append(env.key(it) + "='" + env.expandedValueForKey(env.key(it)) + '\'');