forked from qt-creator/qt-creator
VcsBaseClientImpl: Don't leak VcsCommand instances
The running VcsCommand may leak on shutdown. Make them always a child of a guard object. Change-Id: Ie2d07d15cd13f1c08636bb1e9c5face09c6a782d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1769,7 +1769,7 @@ VcsCommand *GitPluginPrivate::createInitialCheckoutCommand(const QString &url,
|
||||
QStringList args = {"clone", "--progress"};
|
||||
args << extraArgs << url << localName;
|
||||
|
||||
auto command = VcsBaseClient::createVcsCommand(baseDirectory,
|
||||
auto command = VcsBaseClient::createVcsCommand(this, baseDirectory,
|
||||
gitClient().processEnvironment(baseDirectory));
|
||||
command->addFlags(RunFlags::SuppressStdErr);
|
||||
command->addJob({gitClient().vcsBinary(baseDirectory), args}, -1);
|
||||
|
||||
Reference in New Issue
Block a user