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:
Jarek Kobus
2024-03-18 19:36:43 +01:00
parent 62832ea958
commit d5e8f70192
9 changed files with 23 additions and 12 deletions

View File

@@ -953,7 +953,7 @@ VcsCommand *BazaarPluginPrivate::createInitialCheckoutCommand(const QString &url
Environment env = m_client.processEnvironment(baseDirectory);
env.set("BZR_PROGRESS_BAR", "text");
auto command = VcsBaseClient::createVcsCommand(baseDirectory, env);
auto command = VcsBaseClient::createVcsCommand(this, baseDirectory, env);
command->addJob({m_client.vcsBinary(baseDirectory), args}, -1);
return command;
}