Incorrect documentation for KRecentFilesAction::saveEntries

Méven meven29 at gmail.com
Wed Nov 24 08:37:27 GMT 2021


I agree with you, this seems like an old oversight, let's fix the
documentation.

Please open a MR, this makes it easier and more focused to talk.

https://api.kde.org/frameworks/kconfig/html/classKConfigGroup.html#afbfe3ee19f420919fae415b2a7488c2d
KConfigGroup::name also precise that <default> is the root group aka no
group in the ini.

Also having a look at usage of the API can help find issues/check your
documentation change is coherent, which I think it is.
https://invent.kde.org/frameworks/kconfigwidgets/-/blob/master/src/krecentfilesaction.h#L137

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).



Le mer. 24 nov. 2021 à 01:06, George Florea Banus <georgefb899 at gmail.com> a
écrit :

> 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
>
>

-- 
Méven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20211124/77e0b3e1/attachment.htm>


More information about the kde-devel mailing list