diff --git a/src/kcmkwin/common/effectsmodel.cpp b/src/kcmkwin/common/effectsmodel.cpp index e596695477..895876cc9a 100644 --- a/src/kcmkwin/common/effectsmodel.cpp +++ b/src/kcmkwin/common/effectsmodel.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -601,14 +602,10 @@ QModelIndex EffectsModel::findByPluginId(const QString &pluginId) const return index(std::distance(m_effects.constBegin(), it), 0); } -static KCModule *loadBinaryConfig(const QString &configModule, QObject *parent) +static KCModule *loadBinaryConfig(const QString &configModule, QWidget *parent) { - if (configModule.isEmpty()) { - return nullptr; - } - const KPluginMetaData metaData(QStringLiteral("kwin/effects/configs/") + configModule); - return KPluginFactory::instantiatePlugin(metaData, parent).plugin; + return KCModuleLoader::loadModule(metaData, parent); } static KCModule *findScriptedConfig(const QString &pluginId, QObject *parent) @@ -636,11 +633,6 @@ void EffectsModel::requestConfigure(const QModelIndex &index, QWindow *transient module = loadBinaryConfig(configModule, dialog); } - if (!module) { - delete dialog; - return; - } - dialog->setWindowTitle(index.data(NameRole).toString()); dialog->winId(); dialog->windowHandle()->setTransientParent(transientParent);