Skip to content

applets/systemmonitor: Use metadata from Applet::pluginMetaData rather than KPackage

When we save the plugin, we use Applet::pluginMetaData::pluginId. Meaning subsequent loads would not have the same plugin id as the child applet that we initially loaded. This is quite confusing behavior IMHO and hard to debug.

With this patch, we explicitly write the preset in the config to make sure it is initialized. In subsequent loads we do not use the pluginMetaData().pluginId() value and thus ensure that the user's preferences are not reset.

Test Plan: Add the CPU widget Change the "Display Style" in the settings Run kquitapp5 plasmashell Start plasmashell again, the style should remain the same

@mart @ahiemstra

Merge request reports