Commit cfdba638 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove unneeded de-duplication logic for plugins

KPluginMetaData::findPlugins takes care of that internally
parent 023bd6cb
......@@ -195,14 +195,7 @@ QVector<Plugin*> PluginManager::filterBy(const QVector<Plugin*> &plugins, const
void PluginManager::loadPlugins()
{
const QVector<KPluginMetaData> plugins = KPluginMetaData::findPlugins(QStringLiteral("kerfuffle"));
QSet<QString> addedPlugins;
for (const KPluginMetaData &metaData : plugins) {
const auto pluginId = metaData.pluginId();
// Filter out duplicate plugins.
if (addedPlugins.contains(pluginId)) {
continue;
}
Plugin *plugin = new Plugin(this, metaData);
plugin->setEnabled(!ArkSettings::disabledPlugins().contains(pluginId));
addedPlugins << pluginId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment