The documentation for KRecentFilesAction::saveEntries says "You can provide the name of the group used to load the entries. If the groupname is empty, entries are saved to a group called 'RecentFiles'".

And in the code it checks if name is empty `(cg.name().isEmpty()) { ... }`, but `cg.name()` is never empty [link1] resulting in the files being saved without a group, it was like this since the method was added [link2].

I wanted to submit a MR to kconfigwidgets also checking if the name is <default>, but since it's been like this from the beginning, it might be better to change the documentation for KRecentFilesAction::saveEntries. ----------------

link1: https://invent.kde.org/frameworks/kconfig/-/blob/e40531e29e2ff52d67156aa8ae7691488ca1c29b/src/core/kconfiggroup.cpp#L98

link2: https://github.com/KDE/kdelibs/commit/9cb1bcace61a1e96c21b92185f41ed2a396fbdd8#diff-8e9f49b617fa7af49d38cb3ac5d5a071ce7090fd832365c00106ec584283e762R91

Reply via email to