Schneegans / Burn-My-Windows

🔥 Disintegrate your windows with style.
GNU General Public License v3.0
2.6k stars 75 forks source link

Make "EanbledByDefault" boolean in metadata.json.in #438

Closed nask0 closed 1 month ago

nask0 commented 1 month ago

Making "EnabledByDefault" boolean instead of string, because newer versions of KWin complains about this. It should be backwards-compatible tho.

Schneegans commented 1 month ago

Thanks for this! To which degree does it "complain"? Is it just some log message or an error shown to the user? Also, do you know which version started to complain?

nask0 commented 1 month ago

It was rather warning log message in journalctl, I didn't see error message. KWin/Plasma versions was > 6.X (KDE Plasma version: 6.0.4; KDE Frameworks version: 6.2.0; Qt Version: 6.7.0), but unfortunately I got myself new PC few days ago and the logs are on my old machine, let me check if they are still there and come back to you with more information. If not, I will test it on my current machine.

Also, just for reference, in KWin current documentation it's declared as boolean as well as in default effects metadata files:

Screenshot_20240521_162136

nask0 commented 1 month ago

Hey there, I just installed the plugins from github and managed to obtain the logs by setting the kf.*=true debug rule in kdebugsettings and running, for example systemsettings kcm_kwin_effects:

...
kf.coreaddons: Checking for plugins in QList("/usr/bin/plasma/kcms", "/usr/lib64/qt6/plugins/plasma/kcms")
kf.coreaddons: Checking for plugins in QList("/usr/bin/plasma/kcms/systemsettings", "/usr/lib64/qt6/plugins/plasma/kcms/systemsettings")
kf.coreaddons: Checking for plugins in QList("/usr/bin/plasma/kcms/systemsettings_qwidgets", "/usr/lib64/qt6/plugins/plasma/kcms/systemsettings_qwidgets")
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_doom/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_doom/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_energize_a/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_energize_a/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_energize_b/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_energize_b/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_fire/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_fire/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_glide/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_glide/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_glitch/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_glitch/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_hexagon/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_hexagon/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_incinerate/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_incinerate/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixelate/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixelate/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixel_wheel/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixel_wheel/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixel_wipe/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_pixel_wipe/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_portal/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_portal/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_tv/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_tv/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_tv_glitch/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_tv_glitch/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_wisps/metadata.json" to be boolean, but it was a string
kf.coreaddons: Expected JSON property "EnabledByDefault" in "~/.local/share/kwin/effects/kwin4_effect_wisps/metadata.json" to be boolean, but it was a string
kf.coreaddons: Checking for plugins in QList("/usr/bin/kwin/effects/plugins", "/usr/lib64/qt6/plugins/kwin/effects/plugins")
...

And here is my system info (please let me know if you need anything else)

KWin version: 6.0.4
Qt Version: 6.7.0
Qt compile version: 6.7.0
XCB compile version: 1.17.0

Operation Mode: Xwayland
Schneegans commented 1 month ago

Alright! Thanks for figuring this out. I just wanted to estimate how important this fix is for users. So I think it's not super-urgent to update all the effects in the KDE store, I assume. It feels more like a warning, doesn't it?

nask0 commented 1 month ago

Alright! Thanks for figuring this out. I just wanted to estimate how important this fix is for users. So I think it's not super-urgent to update all the effects in the KDE store, I assume. It feels more like a warning, doesn't it?

Yes, I think you're right and this can wait, it's not critical or cause any harm, it's seems more like debug/deprecation message to me. Moreover, one must take additional steps to enable debugging settings in KDE environment (which are disabled by default, at lest on Fedora 40) in order to see those log messages. The only reason I saw them in the first place was because I had some nvidia prime related issues on my old laptop and to debug.

Edit: Just for complete clarity, it's a warning msg implemented here (https://github.com/KDE/kcoreaddons/blob/5538f2caa00ad0158b02640b346f8e8c84028d9c/src/lib/plugin/kpluginmetadata.cpp#L454) and it will actually do string comparison instead of returning the boolean, but at the end the effect is the same :)

I just don't know if the KDE folks are gonna remove it for good at some point or not ¯⁠\⁠⁠(⁠ツ⁠)⁠⁠/⁠¯