String getPluginMimeTypeFromExtension(const String& extension) { const Vector<PluginInfo>& plugins = pluginCache.plugins(); for (size_t i = 0; i < plugins.size(); ++i) { for (size_t j = 0; j < plugins[i].mimes.size(); ++j) { const MimeClassInfo& mime = plugins[i].mimes[j]; const Vector<String>& extensions = mime.extensions; for (size_t k = 0; k < extensions.size(); ++k) { if (extension == extensions[k]) return mime.type; } } } return String(); }
String getPluginMimeTypeFromExtension(const String& extension) { const Vector<PluginInfo*>& plugins = pluginCache.plugins(); for (size_t i = 0; i < plugins.size(); ++i) { for (size_t j = 0; j < plugins[i]->mimes.size(); ++j) { MimeClassInfo* mime = plugins[i]->mimes[j]; Vector<String> extensions; mime->suffixes.split(",", extensions); for (size_t k = 0; k < extensions.size(); ++k) { if (extension == extensions[k]) return mime->type; } } } return String(); }
void PluginData::initPlugins() { const Vector<PluginInfo*>& plugins = pluginCache.plugins(); for (size_t i = 0; i < plugins.size(); ++i) m_plugins.append(clone(plugins[i])); }
void PluginData::refresh() { pluginCache.reset(true); pluginCache.plugins(); // Force the plugins to be reloaded now. }