VCS: Abort previous command for the same editor

Broken by e0c5ff03ec.

Task-number: QTCREATORBUG-14630
Change-Id: I123d86b45c6fbc05c7f4cfb52c0be705f75abb75
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-06-25 10:43:57 +03:00
committed by Orgad Shaneh
parent d7c3572a4b
commit 1b0e5d787a

View File

@@ -137,6 +137,7 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory,
auto cmd = new VcsCommand(workingDirectory, processEnvironment());
cmd->setDefaultTimeoutS(vcsTimeoutS());
if (editor) {
editor->setCommand(cmd);
connect(editor, &QObject::destroyed, cmd, &VcsCommand::abort);
connect(cmd, &VcsCommand::finished,
editor, [editor, cmd]() { commandFinished(editor, cmd); });