Commit 3694580e authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kcms/effectmodel] Use KPluginMetaData to load scripted config

Instead of going through the semi-deprecated KPluginTrader and KPluginInfo we can use KPluginLoader directly.
parent bf4c6767
......@@ -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("[X-KDE-Library] == 'kcm_kwin4_genericscripted'")
const QVector<KPluginMetaData> 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;
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