forked from qt-creator/qt-creator
All Plugins: Use global future synchronizer
Instead of using plugin's own synchronizers. The global synchronizer does the synchronization just before all the plugins' destructors run (in sync), so this should be the right equivalent. Change-Id: I8d09c9ea4a11b7a703684ad5319191ce310d992e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <projectexplorer/taskhub.h>
|
||||
|
||||
#include <utils/fsengine/fileiconprovider.h>
|
||||
#include <utils/futuresynchronizer.h>
|
||||
#include <utils/theme/theme.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -38,7 +37,6 @@ public:
|
||||
PySideBuildConfigurationFactory buildConfigFactory;
|
||||
SimpleTargetRunnerFactory runWorkerFactory{{runConfigFactory.runConfigurationId()}};
|
||||
PythonSettings settings;
|
||||
FutureSynchronizer m_futureSynchronizer;
|
||||
};
|
||||
|
||||
PythonPlugin::PythonPlugin()
|
||||
@@ -57,12 +55,6 @@ PythonPlugin *PythonPlugin::instance()
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
FutureSynchronizer *PythonPlugin::futureSynchronizer()
|
||||
{
|
||||
QTC_ASSERT(m_instance, return nullptr);
|
||||
return &m_instance->d->m_futureSynchronizer;
|
||||
}
|
||||
|
||||
void PythonPlugin::initialize()
|
||||
{
|
||||
d = new PythonPluginPrivate;
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace Utils { class FutureSynchronizer; }
|
||||
|
||||
namespace Python::Internal {
|
||||
|
||||
class PythonPlugin final : public ExtensionSystem::IPlugin
|
||||
@@ -19,7 +17,6 @@ public:
|
||||
~PythonPlugin() final;
|
||||
|
||||
static PythonPlugin *instance();
|
||||
static Utils::FutureSynchronizer *futureSynchronizer();
|
||||
|
||||
private:
|
||||
void initialize() final;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "pysideuicextracompiler.h"
|
||||
#include "pythonconstants.h"
|
||||
#include "pythonlanguageclient.h"
|
||||
#include "pythonplugin.h"
|
||||
#include "pythonproject.h"
|
||||
#include "pythonsettings.h"
|
||||
#include "pythontr.h"
|
||||
@@ -17,6 +16,8 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <languageclient/languageclientmanager.h>
|
||||
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
@@ -248,7 +249,7 @@ void PythonRunConfigurationPrivate::checkForPySide(const FilePath &python,
|
||||
});
|
||||
const auto future = Pip::instance(python)->info(package);
|
||||
m_watcher.setFuture(future);
|
||||
PythonPlugin::futureSynchronizer()->addFuture(future);
|
||||
ExtensionSystem::PluginManager::futureSynchronizer()->addFuture(future);
|
||||
}
|
||||
|
||||
void PythonRunConfigurationPrivate::handlePySidePackageInfo(const PipPackageInfo &pySideInfo,
|
||||
|
||||
Reference in New Issue
Block a user