[effectsmodel] Simplify generic config plugin loading
We know exactly which plugin we want to load No need to go through findPlugins()
This commit is contained in:
parent
26fd5d3667
commit
2f9adf4715
1 changed files with 1 additions and 8 deletions
|
@ -619,14 +619,7 @@ static KCModule *loadBinaryConfig(const QString &configModule, QObject *parent)
|
|||
|
||||
static KCModule *findScriptedConfig(const QString &pluginId, QObject *parent)
|
||||
{
|
||||
const QVector<KPluginMetaData> 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;
|
||||
|
|
Loading…
Reference in a new issue