[kcms/decoration] Try loading decoration KCMs without plugin keyword

We're porting away from using plugin keywords (and have done that for
the breeze and oxygen decoration). However to allow that we need to
adjust the loading code.

Keep the old codepath for compatibility.

BUG: 440786
This commit is contained in:
Nicolas Fella 2021-08-09 17:31:51 +02:00
parent 11c7e7a64d
commit 050b4945ce

View file

@ -169,7 +169,15 @@ void PreviewBridge::configure(QQuickItem *ctx)
if (!m_theme.isNull()) {
args.insert(QStringLiteral("theme"), m_theme);
}
KCModule *kcm = m_factory->create<KCModule>(QStringLiteral("kcmodule"), dialog, QVariantList({args}));
KCModule *kcm = nullptr;
kcm = m_factory->create<KCModule>(dialog, QVariantList({args}));
if (!kcm) {
kcm = m_factory->create<KCModule>(QStringLiteral("kcmodule"), dialog, QVariantList({args}));
}
if (!kcm) {
return;
}