VcsCommand: Don't derive from ShellCommand

Transform VcsCommand into VcsCommandDecorator and
attach it to ShellCommand. There is no need to derive
from ShellCommand anymore.

Use ShellCommand's public API to setup vcs command via
VcsCommandDecorator.

Make ShellCommand final.

Change-Id: I39e3699c80a9e108bcaeef7fb02214e2cc0d0dee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-07-14 11:00:00 +02:00
parent a1588918b3
commit a640a6ae8c
3 changed files with 54 additions and 47 deletions

View File

@@ -162,6 +162,11 @@ const FilePath &ShellCommand::defaultWorkingDirectory() const
return d->m_defaultWorkingDirectory;
}
Environment ShellCommand::environment() const
{
return d->m_environment;
}
void ShellCommand::setEnvironment(const Environment &env)
{
d->m_environment = env;