kcm/rules: Port KCM loading to KPluginMetadata

Passing just the plugin name to the KCM loader has been
deprecated in 5.85. This just affects the standalone loading of
the KCM via the window menu.
This commit is contained in:
Ismael Asensio 2021-08-29 13:10:22 +02:00
parent 216233c2ec
commit 77325dbb79

View file

@ -13,6 +13,7 @@
#include <KCMultiDialog>
#include <KLocalizedString>
#include <KPluginMetaData>
int main(int argc, char* argv[])
{
@ -48,8 +49,10 @@ int main(int argc, char* argv[])
kcm_args << QStringLiteral("whole-app");
}
KPluginMetaData pluginData = KPluginMetaData(QStringLiteral("kcms/kcm_kwinrules"));
KCMultiDialog *dialog = new KCMultiDialog;
dialog->addModule(QStringLiteral("kcm_kwinrules"), kcm_args);
dialog->addModule(pluginData, kcm_args);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();