Docker: Correct environment for docker exec calls

Provide way to clean QtcProcess environment which is needed as
e.g. toolchains, build tools, and debugger otherwise run
inside a wrong environment when using docker exec for the
respective process calls.

Change-Id: Ia6de1c90f2134fce260d293a2f6937ab3cfca2ce
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-07-23 11:13:59 +02:00
parent 98ae0d44e6
commit b8bcdd9568
3 changed files with 19 additions and 0 deletions

View File

@@ -259,6 +259,12 @@ void QtcProcess::setEnvironment(const Environment &env)
d->m_haveEnv = true;
}
void QtcProcess::unsetEnvironment()
{
d->m_environment = Environment();
d->m_haveEnv = false;
}
const Environment &QtcProcess::environment() const
{
return d->m_environment;