From 2f9adf47158626b975f564802d5e87a67bed2e48 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 21 Jul 2021 16:10:10 +0200 Subject: [PATCH] [effectsmodel] Simplify generic config plugin loading We know exactly which plugin we want to load No need to go through findPlugins() --- src/kcmkwin/common/effectsmodel.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/kcmkwin/common/effectsmodel.cpp b/src/kcmkwin/common/effectsmodel.cpp index 9fe9eb4fdf..e0f36ceee2 100644 --- a/src/kcmkwin/common/effectsmodel.cpp +++ b/src/kcmkwin/common/effectsmodel.cpp @@ -619,14 +619,7 @@ static KCModule *loadBinaryConfig(const QString &configModule, QObject *parent) static KCModule *findScriptedConfig(const QString &pluginId, QObject *parent) { - const QVector offers = KPluginLoader::findPluginsById(QStringLiteral("kwin/effects/configs/"), QStringLiteral("kcm_kwin4_genericscripted")); - - if (offers.isEmpty()) { - return nullptr; - } - - const KPluginMetaData &generic = offers.first(); - KPluginLoader loader(generic.fileName()); + KPluginLoader loader(QStringLiteral("kwin/effects/configs/kcm_kwin4_genericscripted")); KPluginFactory *factory = loader.factory(); if (!factory) { return nullptr;