forked from qt-creator/qt-creator
VcsCommand: Don't run in separate thread
Change-Id: Ief0e859d3ce48f804e128cc0f5cb1b390a066923 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projecttree.h>
|
||||
|
||||
#include <utils/futuresynchronizer.h>
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -40,7 +39,6 @@ class VcsPluginPrivate
|
||||
public:
|
||||
CommonOptionsPage m_settingsPage;
|
||||
QStandardItemModel *m_nickNameModel = nullptr;
|
||||
FutureSynchronizer m_synchronizer;
|
||||
};
|
||||
|
||||
static VcsPlugin *m_instance = nullptr;
|
||||
@@ -53,7 +51,6 @@ VcsPlugin::VcsPlugin()
|
||||
VcsPlugin::~VcsPlugin()
|
||||
{
|
||||
QTC_ASSERT(d, return);
|
||||
d->m_synchronizer.waitForFinished();
|
||||
VcsOutputWindow::destroy();
|
||||
m_instance = nullptr;
|
||||
delete d;
|
||||
@@ -65,7 +62,6 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
Q_UNUSED(errorMessage)
|
||||
|
||||
d = new VcsPluginPrivate;
|
||||
d->m_synchronizer.setCancelOnWait(true);
|
||||
|
||||
EditorManager::addCloseEditorListener([this](IEditor *editor) -> bool {
|
||||
bool result = true;
|
||||
@@ -124,11 +120,6 @@ VcsPlugin *VcsPlugin::instance()
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void VcsPlugin::addFuture(const QFuture<void> &future)
|
||||
{
|
||||
m_instance->d->m_synchronizer.addFuture(future);
|
||||
}
|
||||
|
||||
CommonVcsSettings &VcsPlugin::settings() const
|
||||
{
|
||||
return d->m_settingsPage.settings();
|
||||
|
||||
Reference in New Issue
Block a user