<div dir="ltr"><div>I agree with you, this seems like an old oversight, let's fix the documentation.<br></div><div><br></div><div>Please open a MR, this makes it easier and more focused to talk.</div><div><br></div><div><a href="https://api.kde.org/frameworks/kconfig/html/classKConfigGroup.html#afbfe3ee19f420919fae415b2a7488c2d">https://api.kde.org/frameworks/kconfig/html/classKConfigGroup.html#afbfe3ee19f420919fae415b2a7488c2d</a></div><div>KConfigGroup::name also precise that <default> is the root group aka no group in the ini.<br></div><div><br></div><div>Also having a look at usage of the API can help find issues/check your documentation change is coherent, which I think it is.<br></div><div></div><div><a href="https://invent.kde.org/frameworks/kconfigwidgets/-/blob/master/src/krecentfilesaction.h#L137">https://invent.kde.org/frameworks/kconfigwidgets/-/blob/master/src/krecentfilesaction.h#L137</a></div><div><br></div><div>Making the implementation follow the documentation will cause user data loss because data would be expected to be located in a different group (for concerned users).<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 24 nov. 2021 à 01:06, George Florea Banus <<a href="mailto:georgefb899@gmail.com">georgefb899@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p>The documentation for KRecentFilesAction::saveEntries says "<span style="color:rgb(0,0,0);font-family:"Noto Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">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'</span>".</p>
    <p>And in the code it checks if name is empty `(<a href="http://cg.name" target="_blank">cg.name</a>().isEmpty()) { ... }`, but `<a href="http://cg.name" target="_blank">cg.name</a>()` is never empty [link1] resulting in the files being saved without a group, it was like this since the method was added [link2].</p>
    <p>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.

----------------</p>
    <p>link1: <a href="https://invent.kde.org/frameworks/kconfig/-/blob/e40531e29e2ff52d67156aa8ae7691488ca1c29b/src/core/kconfiggroup.cpp#L98" target="_blank">https://invent.kde.org/frameworks/kconfig/-/blob/e40531e29e2ff52d67156aa8ae7691488ca1c29b/src/core/kconfiggroup.cpp#L98</a></p>
    <p>link2: <a href="https://github.com/KDE/kdelibs/commit/9cb1bcace61a1e96c21b92185f41ed2a396fbdd8#diff-8e9f49b617fa7af49d38cb3ac5d5a071ce7090fd832365c00106ec584283e762R91" target="_blank">https://github.com/KDE/kdelibs/commit/9cb1bcace61a1e96c21b92185f41ed2a396fbdd8#diff-8e9f49b617fa7af49d38cb3ac5d5a071ce7090fd832365c00106ec584283e762R91</a></p>
    <p></p>
  </div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Méven</div>