forked from qt-creator/qt-creator
Fix a possible crash on shutdown while executing VcsCommand
Add a global synchronizer to the VcsPlugin. Fixes: QTCREATORBUG-25744 Change-Id: I97578f4a5b5275071aa0253a22fc9ab2f90d9b75 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "vcscommand.h"
|
||||
#include "vcsbaseplugin.h"
|
||||
#include "vcsoutputwindow.h"
|
||||
#include "vcsplugin.h"
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
@@ -78,6 +79,12 @@ void VcsCommand::runCommand(SynchronousProcess &proc,
|
||||
emitRepositoryChanged(workingDirectory);
|
||||
}
|
||||
|
||||
void VcsCommand::addTask(QFuture<void> &future)
|
||||
{
|
||||
Core::ShellCommand::addTask(future);
|
||||
Internal::VcsPlugin::addFuture(future);
|
||||
}
|
||||
|
||||
void VcsCommand::emitRepositoryChanged(const QString &workingDirectory)
|
||||
{
|
||||
if (m_preventRepositoryChanged || !(flags() & VcsCommand::ExpectRepoChanges))
|
||||
|
||||
Reference in New Issue
Block a user