forked from qt-creator/qt-creator
Remove PluginManager::futureSynchronizer()
Use the global synchronizer from Utils::futureSynchronizer() directly Change-Id: Ic8843bc1ff7951c041529a258f36117f08ec4b35 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -434,11 +434,6 @@ QString PluginManager::systemInformation()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureSynchronizer *PluginManager::futureSynchronizer()
|
|
||||||
{
|
|
||||||
return Utils::futureSynchronizer();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
The list of paths were the plugin manager searches for plugins.
|
The list of paths were the plugin manager searches for plugins.
|
||||||
|
|
||||||
|
@@ -16,8 +16,6 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QTextStream;
|
class QTextStream;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Utils { class FutureSynchronizer; }
|
|
||||||
|
|
||||||
namespace ExtensionSystem {
|
namespace ExtensionSystem {
|
||||||
class IPlugin;
|
class IPlugin;
|
||||||
class PluginSpec;
|
class PluginSpec;
|
||||||
@@ -139,8 +137,6 @@ public:
|
|||||||
|
|
||||||
static QString systemInformation();
|
static QString systemInformation();
|
||||||
|
|
||||||
static Utils::FutureSynchronizer *futureSynchronizer();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void objectAdded(QObject *obj);
|
void objectAdded(QObject *obj);
|
||||||
void aboutToRemoveObject(QObject *obj);
|
void aboutToRemoveObject(QObject *obj);
|
||||||
|
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include <coreplugin/messagemanager.h>
|
#include <coreplugin/messagemanager.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -172,7 +170,7 @@ void FileApiReader::stop()
|
|||||||
|
|
||||||
if (m_future) {
|
if (m_future) {
|
||||||
m_future->cancel();
|
m_future->cancel();
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(*m_future);
|
Utils::futureSynchronizer()->addFuture(*m_future);
|
||||||
}
|
}
|
||||||
m_future = {};
|
m_future = {};
|
||||||
m_isParsing = false;
|
m_isParsing = false;
|
||||||
|
@@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
#include <coreplugin/progressmanager/progressmanager.h>
|
#include <coreplugin/progressmanager/progressmanager.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/treescanner.h>
|
#include <projectexplorer/treescanner.h>
|
||||||
|
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
@@ -190,7 +188,7 @@ void CompilationDbParser::start()
|
|||||||
"CompilationDatabase.Parse");
|
"CompilationDatabase.Parse");
|
||||||
++m_runningParserJobs;
|
++m_runningParserJobs;
|
||||||
m_parserWatcher.setFuture(future);
|
m_parserWatcher.setFuture(future);
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
Utils::futureSynchronizer()->addFuture(future);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompilationDbParser::stop()
|
void CompilationDbParser::stop()
|
||||||
|
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
#include "../coreplugintr.h"
|
#include "../coreplugintr.h"
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <solutions/tasking/tasktreerunner.h>
|
#include <solutions/tasking/tasktreerunner.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -277,8 +275,8 @@ ResultsCollector::~ResultsCollector()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_deduplicator->cancel();
|
m_deduplicator->cancel();
|
||||||
if (ExtensionSystem::PluginManager::futureSynchronizer()) {
|
if (Utils::futureSynchronizer()) {
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_watcher->future());
|
Utils::futureSynchronizer()->addFuture(m_watcher->future());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_watcher->future().waitForFinished();
|
m_watcher->future().waitForFinished();
|
||||||
|
@@ -21,8 +21,6 @@
|
|||||||
#include <cplusplus/Overview.h>
|
#include <cplusplus/Overview.h>
|
||||||
#include <cplusplus/TypeOfExpression.h>
|
#include <cplusplus/TypeOfExpression.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <texteditor/refactoroverlay.h>
|
#include <texteditor/refactoroverlay.h>
|
||||||
#include <texteditor/texteditorconstants.h>
|
#include <texteditor/texteditorconstants.h>
|
||||||
|
|
||||||
@@ -239,7 +237,7 @@ void FunctionDeclDefLinkFinder::startFindLinkAt(
|
|||||||
m_watcher.reset(new QFutureWatcher<std::shared_ptr<FunctionDeclDefLink> >());
|
m_watcher.reset(new QFutureWatcher<std::shared_ptr<FunctionDeclDefLink> >());
|
||||||
connect(m_watcher.get(), &QFutureWatcherBase::finished, this, &FunctionDeclDefLinkFinder::onFutureDone);
|
connect(m_watcher.get(), &QFutureWatcherBase::finished, this, &FunctionDeclDefLinkFinder::onFutureDone);
|
||||||
m_watcher->setFuture(Utils::asyncRun(findLinkHelper, result, refactoringChanges));
|
m_watcher->setFuture(Utils::asyncRun(findLinkHelper, result, refactoringChanges));
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_watcher->future());
|
Utils::futureSynchronizer()->addFuture(m_watcher->future());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FunctionDeclDefLink::isValid() const
|
bool FunctionDeclDefLink::isValid() const
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
#include <cplusplus/CppDocument.h>
|
#include <cplusplus/CppDocument.h>
|
||||||
#include <cplusplus/TranslationUnit.h>
|
#include <cplusplus/TranslationUnit.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
#include <utils/futuresynchronizer.h>
|
#include <utils/futuresynchronizer.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
@@ -143,7 +141,7 @@ void SemanticInfoUpdater::updateDetached(const SemanticInfo::Source &source)
|
|||||||
});
|
});
|
||||||
const auto future = Utils::asyncRun(CppModelManager::sharedThreadPool(), doUpdate, source);
|
const auto future = Utils::asyncRun(CppModelManager::sharedThreadPool(), doUpdate, source);
|
||||||
d->m_watcher->setFuture(future);
|
d->m_watcher->setFuture(future);
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
Utils::futureSynchronizer()->addFuture(future);
|
||||||
}
|
}
|
||||||
|
|
||||||
SemanticInfo SemanticInfoUpdater::semanticInfo() const
|
SemanticInfo SemanticInfoUpdater::semanticInfo() const
|
||||||
|
@@ -7,8 +7,6 @@
|
|||||||
#include "cppeditorwidget.h"
|
#include "cppeditorwidget.h"
|
||||||
#include "cppmodelmanager.h"
|
#include "cppmodelmanager.h"
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <utils/futuresynchronizer.h>
|
#include <utils/futuresynchronizer.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/textutils.h>
|
#include <utils/textutils.h>
|
||||||
@@ -75,7 +73,7 @@ CppUseSelectionsUpdater::RunnerInfo CppUseSelectionsUpdater::update(CallType cal
|
|||||||
m_runnerWordStartPosition = params.textCursor.position();
|
m_runnerWordStartPosition = params.textCursor.position();
|
||||||
|
|
||||||
m_runnerWatcher->setFuture(cppEditorDocument->cursorInfo(params));
|
m_runnerWatcher->setFuture(cppEditorDocument->cursorInfo(params));
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_runnerWatcher->future());
|
Utils::futureSynchronizer()->addFuture(m_runnerWatcher->future());
|
||||||
return RunnerInfo::Started;
|
return RunnerInfo::Started;
|
||||||
} else { // synchronous case
|
} else { // synchronous case
|
||||||
abortSchedule();
|
abortSchedule();
|
||||||
|
@@ -9,8 +9,6 @@
|
|||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
#include <projectexplorer/kitoptionspage.h>
|
#include <projectexplorer/kitoptionspage.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
@@ -488,7 +486,7 @@ void DebuggerItemConfigWidget::binaryPathHasChanged()
|
|||||||
tmp.reinitializeFromFile();
|
tmp.reinitializeFromFile();
|
||||||
return tmp;
|
return tmp;
|
||||||
}));
|
}));
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_updateWatcher.future());
|
Utils::futureSynchronizer()->addFuture(m_updateWatcher.future());
|
||||||
} else {
|
} else {
|
||||||
const DebuggerItem tmp;
|
const DebuggerItem tmp;
|
||||||
setAbis(tmp.abiNames());
|
setAbis(tmp.abiNames());
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/iversioncontrol.h>
|
#include <coreplugin/iversioncontrol.h>
|
||||||
#include <coreplugin/progressmanager/progressmanager.h>
|
#include <coreplugin/progressmanager/progressmanager.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <vcsbase/submitfilemodel.h>
|
#include <vcsbase/submitfilemodel.h>
|
||||||
@@ -210,7 +209,7 @@ void GitSubmitEditor::updateFileModel()
|
|||||||
Core::ProgressManager::addTask(m_fetchWatcher.future(), Tr::tr("Refreshing Commit Data"),
|
Core::ProgressManager::addTask(m_fetchWatcher.future(), Tr::tr("Refreshing Commit Data"),
|
||||||
TASK_UPDATE_COMMIT);
|
TASK_UPDATE_COMMIT);
|
||||||
|
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_fetchWatcher.future());
|
Utils::futureSynchronizer()->addFuture(m_fetchWatcher.future());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GitSubmitEditor::forceUpdateFileModel()
|
void GitSubmitEditor::forceUpdateFileModel()
|
||||||
|
@@ -8,8 +8,6 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/progressmanager/progressmanager.h>
|
#include <coreplugin/progressmanager/progressmanager.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
#include <utils/filesystemwatcher.h>
|
#include <utils/filesystemwatcher.h>
|
||||||
@@ -140,7 +138,7 @@ void HelpManager::registerDocumentation(const QStringList &files)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QFuture<bool> future = Utils::asyncRun(®isterDocumentationNow, collectionFilePath(), files);
|
QFuture<bool> future = Utils::asyncRun(®isterDocumentationNow, collectionFilePath(), files);
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
Utils::futureSynchronizer()->addFuture(future);
|
||||||
Utils::onResultReady(future, this, [](bool docsChanged){
|
Utils::onResultReady(future, this, [](bool docsChanged){
|
||||||
if (docsChanged) {
|
if (docsChanged) {
|
||||||
d->m_helpEngine->setupData();
|
d->m_helpEngine->setupData();
|
||||||
@@ -203,7 +201,7 @@ void HelpManager::unregisterDocumentation(const QStringList &files)
|
|||||||
|
|
||||||
d->m_userRegisteredFiles.subtract(Utils::toSet(files));
|
d->m_userRegisteredFiles.subtract(Utils::toSet(files));
|
||||||
QFuture<bool> future = Utils::asyncRun(&unregisterDocumentationNow, collectionFilePath(), files);
|
QFuture<bool> future = Utils::asyncRun(&unregisterDocumentationNow, collectionFilePath(), files);
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
Utils::futureSynchronizer()->addFuture(future);
|
||||||
Utils::onResultReady(future, this, [](bool docsChanged){
|
Utils::onResultReady(future, this, [](bool docsChanged){
|
||||||
if (docsChanged) {
|
if (docsChanged) {
|
||||||
d->m_helpEngine->setupData();
|
d->m_helpEngine->setupData();
|
||||||
|
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/kitaspects.h>
|
#include <projectexplorer/kitaspects.h>
|
||||||
#include <projectexplorer/kitmanager.h>
|
#include <projectexplorer/kitmanager.h>
|
||||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||||
@@ -34,8 +32,8 @@
|
|||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/futuresynchronizer.h>
|
#include <utils/futuresynchronizer.h>
|
||||||
#include <utils/qtcprocess.h>
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDomDocument>
|
#include <QDomDocument>
|
||||||
@@ -386,8 +384,7 @@ void IosConfigurations::updateSimulators()
|
|||||||
dev = IDevice::ConstPtr(new IosSimulator(devId));
|
dev = IDevice::ConstPtr(new IosSimulator(devId));
|
||||||
devManager->addDevice(dev);
|
devManager->addDevice(dev);
|
||||||
}
|
}
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(
|
Utils::futureSynchronizer()->addFuture(SimulatorControl::updateAvailableSimulators(this));
|
||||||
SimulatorControl::updateAvailableSimulators(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosConfigurations::setDeveloperPath(const FilePath &devPath)
|
void IosConfigurations::setDeveloperPath(const FilePath &devPath)
|
||||||
|
@@ -2187,7 +2187,7 @@ void ProjectExplorerPluginPrivate::checkRecentProjectsAsync()
|
|||||||
p.exists = p.filePath.needsDevice() || p.filePath.isFile();
|
p.exists = p.filePath.needsDevice() || p.filePath.isFile();
|
||||||
return p;
|
return p;
|
||||||
});
|
});
|
||||||
PluginManager::futureSynchronizer()->addFuture(m_recentProjectsFuture);
|
Utils::futureSynchronizer()->addFuture(m_recentProjectsFuture);
|
||||||
|
|
||||||
onResultReady(m_recentProjectsFuture, this, [this](const RecentProjectsEntry &p) {
|
onResultReady(m_recentProjectsFuture, this, [this](const RecentProjectsEntry &p) {
|
||||||
auto it = std::find_if(
|
auto it = std::find_if(
|
||||||
|
@@ -30,8 +30,6 @@
|
|||||||
#include <projectexplorer/runconfiguration.h>
|
#include <projectexplorer/runconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/commandline.h>
|
#include <utils/commandline.h>
|
||||||
#include <utils/detailswidget.h>
|
#include <utils/detailswidget.h>
|
||||||
@@ -110,7 +108,7 @@ void PySideBuildStep::checkForPySide(const FilePath &python, const QString &pySi
|
|||||||
});
|
});
|
||||||
const auto future = Pip::instance(python)->info(package);
|
const auto future = Pip::instance(python)->info(package);
|
||||||
m_watcher->setFuture(future);
|
m_watcher->setFuture(future);
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
Utils::futureSynchronizer()->addFuture(future);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PySideBuildStep::handlePySidePackageInfo(const PipPackageInfo &pySideInfo,
|
void PySideBuildStep::handlePySidePackageInfo(const PipPackageInfo &pySideInfo,
|
||||||
|
@@ -10,8 +10,6 @@
|
|||||||
#include "suppression.h"
|
#include "suppression.h"
|
||||||
#include "../valgrindtr.h"
|
#include "../valgrindtr.h"
|
||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
|
||||||
|
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
#include <utils/expected.h>
|
#include <utils/expected.h>
|
||||||
#include <utils/futuresynchronizer.h>
|
#include <utils/futuresynchronizer.h>
|
||||||
@@ -684,7 +682,7 @@ public:
|
|||||||
if (!m_watcher)
|
if (!m_watcher)
|
||||||
return;
|
return;
|
||||||
m_thread->cancel();
|
m_thread->cancel();
|
||||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(m_watcher->future());
|
Utils::futureSynchronizer()->addFuture(m_watcher->future());
|
||||||
}
|
}
|
||||||
|
|
||||||
void start()
|
void start()
|
||||||
|
Reference in New Issue
Block a user