1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-03 04:47:37 +02:00

ModuleManager doesn't use PluginManager to initialize providers

This commit is contained in:
Paul Licameli
2020-02-20 07:35:11 -05:00
parent 2e7f7114d2
commit 02b61532fe
3 changed files with 16 additions and 23 deletions

View File

@@ -448,20 +448,8 @@ bool ModuleManager::DiscoverProviders()
FileNames::FindFilesInPathList(wxT("*.so"), pathList, provList);
#endif
PluginManager & pm = PluginManager::Get();
for (int i = 0, cnt = provList.size(); i < cnt; i++)
{
ModuleInterface *module = LoadModule(provList[i]);
if (module)
{
// Register the provider
pm.RegisterPlugin(module);
// Now, allow the module to auto-register children
module->AutoRegisterPlugins(pm);
}
}
for ( const auto &path : provList )
LoadModule(path);
#endif
return true;
@@ -469,8 +457,6 @@ bool ModuleManager::DiscoverProviders()
void ModuleManager::InitializeBuiltins()
{
PluginManager & pm = PluginManager::Get();
for (auto moduleMain : builtinModuleList())
{
ModuleInterfaceHandle module {
@@ -481,13 +467,10 @@ void ModuleManager::InitializeBuiltins()
{
// Register the provider
ModuleInterface *pInterface = module.get();
const PluginID & id = pm.RegisterPlugin(pInterface);
auto id = GetID(pInterface);
// Need to remember it
mDynModules[id] = std::move(module);
// Allow the module to auto-register children
pInterface->AutoRegisterPlugins(pm);
}
else
{