Emit deprecation warnings for loading KCM using a plugin keyword

Otherwise consumers will not know about the change and this way it is clear that the logic should be removed in the future
This commit is contained in:
Alexander Lohnau 2021-08-23 18:13:19 +02:00
parent 6f110bca1d
commit cd4ef30b21

View file

@ -183,9 +183,14 @@ void PreviewBridge::configure(QQuickItem *ctx)
kcm = m_factory->create<KCModule>(dialog, QVariantList({args}));
#if KCOREADDONS_BUILD_DEPRECATED_SINCE(5, 87)
if (!kcm) {
kcm = m_factory->create<KCModule>(QStringLiteral("kcmodule"), dialog, QVariantList({args}));
if (kcm) {
qWarning() << "Loading a KCModule using the kcmodule keyword is deprecated in KWin 5.23, register the plugin without a keyword instead" << m_theme;
}
}
#endif
if (!kcm) {
return;