Eliminate last use of PluginManager by ModuleManager, breaking cycle
This commit is contained in:
parent
02b61532fe
commit
d5a22dfb15
|
@ -31,7 +31,6 @@ i.e. an alternative to the usual interface, for Audacity.
|
|||
|
||||
#include "FileNames.h"
|
||||
#include "MemoryX.h"
|
||||
#include "PluginManager.h"
|
||||
|
||||
#include "audacity/PluginInterface.h"
|
||||
|
||||
|
@ -488,22 +487,6 @@ void ModuleInterfaceDeleter::operator() (ModuleInterface *pInterface) const
|
|||
}
|
||||
}
|
||||
|
||||
PluginPaths ModuleManager::FindPluginsForProvider(const PluginID & providerID,
|
||||
const PluginPath & path)
|
||||
{
|
||||
// Instantiate if it hasn't already been done
|
||||
if (mDynModules.find(providerID) == mDynModules.end())
|
||||
{
|
||||
// If it couldn't be created, just give up and return an empty list
|
||||
if (!CreateProviderInstance(providerID, path))
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
return mDynModules[providerID]->FindPluginPaths(PluginManager::Get());
|
||||
}
|
||||
|
||||
bool ModuleManager::RegisterEffectPlugin(const PluginID & providerID, const PluginPath & path, TranslatableString &errMsg)
|
||||
{
|
||||
errMsg = {};
|
||||
|
|
|
@ -103,7 +103,6 @@ public:
|
|||
auto Providers() const
|
||||
{ return make_iterator_range(mDynModules.cbegin(), mDynModules.cend()); }
|
||||
|
||||
PluginPaths FindPluginsForProvider(const PluginID & provider, const PluginPath & path);
|
||||
bool RegisterEffectPlugin(const PluginID & provider, const PluginPath & path,
|
||||
TranslatableString &errMsg);
|
||||
|
||||
|
|
|
@ -1382,7 +1382,9 @@ void PluginManager::CheckForUpdates(bool bFast)
|
|||
else
|
||||
{
|
||||
// Collect plugin paths
|
||||
auto paths = mm.FindPluginsForProvider(plugID, plugPath);
|
||||
PluginPaths paths;
|
||||
if (auto provider = mm.CreateProviderInstance( plugID, plugPath ) )
|
||||
paths = provider->FindPluginPaths( *this );
|
||||
for (size_t i = 0, cnt = paths.size(); i < cnt; i++)
|
||||
{
|
||||
wxString path = paths[i].BeforeFirst(wxT(';'));;
|
||||
|
|
Loading…
Reference in New Issue