QList<QWebPluginFactory::Plugin> AWebPluginFactory::plugins() const { QList<QWebPluginFactory::Plugin> list; for(int i = 0; i < factories.count(); i++) { WebPlugin* pluginFactory = factories.at(i); QList<APlugin> pluginList = pluginFactory->getPlugins(); for(int j = 0; j < pluginList.count(); j++) { APlugin plugin = pluginList.at(j); // Construct each plugin QWebPluginFactory::Plugin plugin_; plugin_.name = plugin.name; plugin_.description = plugin.description; for(int k = 0; k < plugin.mimeTypes.count(); k++) { AMimeType mimeType = plugin.mimeTypes.at(k); // Construct each mime type QWebPluginFactory::MimeType mimeType_; mimeType_.name = mimeType.name; mimeType_.description = mimeType.description; mimeType_.fileExtensions = mimeType.extensions; plugin_.mimeTypes.append(mimeType_); } list.append(plugin_); } } return list; }
WebPlugin::WebPlugin(const WebPlugin &plugin) { setName(plugin.getName()); setDescription(plugin.getDescription()); setPlugins(plugin.getPlugins()); }