mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Ref T312, plugin manager listener chec function (simulator available?)
This commit is contained in:
@@ -41,7 +41,7 @@ namespace BlackCore
|
||||
ISimulatorFactory *factory = getFactory(pluginId);
|
||||
if (!factory)
|
||||
{
|
||||
CLogMessage(this).warning("Could not load plugin %1.") << pluginId;
|
||||
CLogMessage(this).warning("Could not load plugin '%1'.") << pluginId;
|
||||
m_plugins.remove(pluginId);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -71,6 +71,20 @@ namespace BlackCore
|
||||
return list;
|
||||
}
|
||||
|
||||
int CPluginManagerSimulator::checkAvailableListeners()
|
||||
{
|
||||
if (m_plugins.isEmpty()) { return 0; }
|
||||
|
||||
int c = 0;
|
||||
for (PluginExtended &pi : m_plugins.values())
|
||||
{
|
||||
if (!pi.listener) { continue; }
|
||||
pi.listener->check();
|
||||
c++;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
void CPluginManagerSimulator::collectPlugins()
|
||||
{
|
||||
IPluginManager::collectPlugins();
|
||||
|
||||
Reference in New Issue
Block a user