forked from qt-creator/qt-creator
BinEditor: Don't register editor factory in global object pool
Only the service factory is needed. Change-Id: I40840d6948075f8656eb0cf7113fcc6b95b8f037 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -2352,7 +2352,7 @@ static BinEditorFactoryService &binEditorService()
|
||||
|
||||
///////////////////////////////// BinEditorFactory //////////////////////////////////
|
||||
|
||||
class BinEditorFactory final : public QObject, public IEditorFactory
|
||||
class BinEditorFactory final : public IEditorFactory
|
||||
{
|
||||
public:
|
||||
BinEditorFactory()
|
||||
@@ -2367,13 +2367,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static BinEditorFactory &binEditorFactory()
|
||||
void setupBinEditor()
|
||||
{
|
||||
static BinEditorFactory theBinEditorFactory;
|
||||
return theBinEditorFactory;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////// BinEditorPlugin //////////////////////////////////
|
||||
|
||||
class BinEditorPlugin final : public ExtensionSystem::IPlugin
|
||||
@@ -2384,13 +2382,12 @@ class BinEditorPlugin final : public ExtensionSystem::IPlugin
|
||||
~BinEditorPlugin() final
|
||||
{
|
||||
ExtensionSystem::PluginManager::removeObject(&binEditorService());
|
||||
ExtensionSystem::PluginManager::removeObject(&binEditorFactory());
|
||||
}
|
||||
|
||||
void initialize() final
|
||||
{
|
||||
setupBinEditor();
|
||||
ExtensionSystem::PluginManager::addObject(&binEditorService());
|
||||
ExtensionSystem::PluginManager::addObject(&binEditorFactory());
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user