41 , plugin_providers_(plugin_providers)
65 QList<PluginDescriptor*> descriptors;
68 QList<PluginDescriptor*> sub_descriptors;
71 sub_descriptors = (*it)->discover_descriptors(discovery_data);
73 catch (std::runtime_error e)
76 qCritical(
"CompositePluginProvider::discover() could not discover plugins from provider - runtime_error:\n%s", e.what());
82 qCritical(
"CompositePluginProvider::discover() could not discover plugins from provider");
86 QSet<QString> plugin_ids;
87 for (QList<PluginDescriptor*>::iterator jt = sub_descriptors.begin(); jt != sub_descriptors.end(); jt++)
90 descriptors.append(descriptor);
91 plugin_ids.insert(descriptor->
pluginId());
103 if (it.value().contains(plugin_id))
108 void* instance = plugin_provider->
load(plugin_id, plugin_context);
112 catch (std::exception& e)
114 qWarning(
"CompositePluginProvider::load(%s) failed loading plugin (%s)", plugin_id.toStdString().c_str(), e.what());
127 if (it.value().contains(plugin_id))
136 catch (std::exception& e)
148 QMap<void*, PluginProvider*>::iterator it =
running_plugins_.find(plugin_instance);
151 (*it)->unload(plugin_instance);
155 throw std::runtime_error(
"plugin_instance not found");