diff --git a/src/plugins/vcsbase/vcscommand.cpp b/src/plugins/vcsbase/vcscommand.cpp index 82ae1a4d278..01351f65faf 100644 --- a/src/plugins/vcsbase/vcscommand.cpp +++ b/src/plugins/vcsbase/vcscommand.cpp @@ -363,11 +363,9 @@ void VcsCommand::cancel() // TODO: we may want to call cancel here... d->m_process->stop(); // TODO: we may want to not wait here... - // However, VcsBaseDiffEditorController::runCommand() relies on getting finished() signal d->m_process->waitForFinished(); d->m_process.reset(); } - emit terminate(); } QString VcsCommand::cleanedStdOut() const @@ -394,13 +392,7 @@ CommandResult VcsCommand::runCommand(const CommandLine &command, int timeoutS) d->setupProcess(&process, {command, timeoutS, d->m_defaultWorkingDirectory, {}}); const EventLoopMode eventLoopMode = d->eventLoopMode(); - if (eventLoopMode == EventLoopMode::On) { - connect(this, &VcsCommand::terminate, &process, [&process] { - process.stop(); - process.waitForFinished(); - }); - process.setTimeOutMessageBoxEnabled(true); - } + process.setTimeOutMessageBoxEnabled(eventLoopMode == EventLoopMode::On); process.runBlocking(eventLoopMode); d->handleDone(&process); diff --git a/src/plugins/vcsbase/vcscommand.h b/src/plugins/vcsbase/vcscommand.h index 552cd1225aa..d4e5697624d 100644 --- a/src/plugins/vcsbase/vcscommand.h +++ b/src/plugins/vcsbase/vcscommand.h @@ -125,8 +125,6 @@ signals: void stdErrText(const QString &); void done(); - void terminate(); // Internal - void append(const QString &text); void appendSilently(const QString &text); void appendError(const QString &text);