Add a simple delete option to kwriteconfig. A possible usecase of this option is to delete unused shortcut bindings.
I don't think deleting a entry from a config file makes sense. If you delete an entry you will get the default value on the next read.
For shortcuts it's a bit more complicated. What shortcuts had you in mind to delete?
What shortcuts had you in mind to delete?
My specific interest is deleting shortcuts of removed KWin scripts. ( e.g. https://github.com/esjeon/krohnkite/issues/31 ) Such shortcuts keep appearing on Global Shortcuts dialog unless manually deleted. Also, while developing the script, I leave garbage values behind, and having this around will be handy.
If you delete an entry you will get the default value on the next read.
I believe some people will find such behaviour(?) useful. You can safely "reset" configs from CLI without worrying about putting wrong values.
Yeah, that sounds like a better approach for the shortcut thing. But I want to make clear that I submitted this patch only after verifying that this works for my case, for whatever reason.
Also, I don't see anything wrong with adding this, since it merely exposes deleteEntry method already in the API. Some projects do rely on it, so why should it be kept away from actual human beings?
Shortcuts aside, the patch makes sense.
In general, I want to encourage people to wipe config entries rather than write in the current default as it makes several other things work better.
Do you have commit access?