From 3694580e2b14f2f9cbef9c74ee1fbf3fc1dc6a96 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 30 Sep 2020 13:17:04 +0200 Subject: [PATCH] [kcms/effectmodel] Use KPluginMetaData to load scripted config Instead of going through the semi-deprecated KPluginTrader and KPluginInfo we can use KPluginLoader directly. --- kcmkwin/common/effectsmodel.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/kcmkwin/common/effectsmodel.cpp b/kcmkwin/common/effectsmodel.cpp index 7f4165322f..cfec9e08ed 100644 --- a/kcmkwin/common/effectsmodel.cpp +++ b/kcmkwin/common/effectsmodel.cpp @@ -597,18 +597,14 @@ static KCModule *findBinaryConfig(const QString &pluginId, QObject *parent) static KCModule *findScriptedConfig(const QString &pluginId, QObject *parent) { - const auto offers = KPluginTrader::self()->query( - QStringLiteral("kwin/effects/configs/"), - QString(), - QStringLiteral("[X-KDE-Library] == 'kcm_kwin4_genericscripted'") - ); + const QVector offers = KPluginLoader::findPluginsById(QStringLiteral("kwin/effects/configs/"), QStringLiteral("kcm_kwin4_genericscripted")); if (offers.isEmpty()) { return nullptr; } - const KPluginInfo &generic = offers.first(); - KPluginLoader loader(generic.libraryPath()); + const KPluginMetaData &generic = offers.first(); + KPluginLoader loader(generic.fileName()); KPluginFactory *factory = loader.factory(); if (!factory) { return nullptr;