Bug 452757

Summary: Port to Plasmoid attached property in wallpapers breaks kcm
Product: [Unmaintained] kscreenlocker Reporter: David Redondo <kde>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, bshah, kde, nate
Priority: VHI Keywords: regression
Version First Reported In: git-master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description David Redondo 2022-04-19 09:29:38 UTC
Wallpaper config is not only loaded in plasma but also int the screenlocker kcm

Image, SlideShow:
 file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/config.qml:13 module "org.kde.plasma.plasmoid" is not installed
Comment 1 Aleix Pol 2022-04-19 10:49:50 UTC
I can only reproduce with the Screen Locking kcm, on the Plasma dialog it looks just fine.

Also I wonder where the error is coming from since the module is obviously installed as it's used all over the place.
Comment 2 Nate Graham 2022-04-19 16:10:54 UTC
Indeed, just in the KCM.
Comment 3 David Redondo 2022-04-19 17:50:34 UTC
I assume the module is only a virtual one, i.e. added runtime by something in plasma-framework with qmlRegister*. And the kcm doesn't do anything plasma
Comment 4 Aleix Pol 2022-04-21 00:01:22 UTC
Moving to kscreenlocker as the broken code is there.
Comment 6 Aleix Pol 2022-04-21 10:55:03 UTC
Git commit 56746387dae2c125e9fc593227f7f3b73ba07096 by Aleix Pol.
Committed on 21/04/2022 at 00:04.
Pushed by davidedmundson into branch 'master'.

kcm: Fix the load of wallpaper kcms

Wallpaper kcms use sometimes the Plasmoid object (conditionally) to
check some parameters.

Recently, we ported from the old "plasmoid" context to the Plasmoid
attached property coming from org.kde.plasma.plasmoid. This needs to
have its import available otherwise QML rightly refuses to load
anything.

This includes the import by only registering a dummy empty object so it
doesn't complain anymore.

M  +5    -0    kcm/kcm.cpp

https://invent.kde.org/plasma/kscreenlocker/commit/56746387dae2c125e9fc593227f7f3b73ba07096