From cd4ef30b21edd4bb9478d506f80fadc048828bbc Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Mon, 23 Aug 2021 18:13:19 +0200 Subject: [PATCH] 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 --- .../kwindecoration/declarative-plugin/previewbridge.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp b/src/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp index 2dd91d4f59..fd5569578d 100644 --- a/src/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp +++ b/src/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp @@ -183,9 +183,14 @@ void PreviewBridge::configure(QQuickItem *ctx) kcm = m_factory->create(dialog, QVariantList({args})); +#if KCOREADDONS_BUILD_DEPRECATED_SINCE(5, 87) if (!kcm) { kcm = m_factory->create(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;