The way KRecentFilesAction is used has a number of problems. It lives in a relatively high tier and is used e.g. by KStandardAction, forcing it to the same high tier. Furthermore the de-facto usage has the problem of mixing configuration and state information (which is not a problem of the API itself). The API is quite flexible, but most of that flexibility isn't acutally used by applications.
KRecentFilesMenu is different in the following ways:
- It lives in KWidgetAddons and thus in Tier 1. With Qt6 and QGuiAction/QGuiMenu it could even go to KGuiAddons
- In order to do this it uses QSettings instead of KConfig which should be fine since we don't need stuff like cascading and immutability
- Instead of using KSelectAction it uses/is a QMenu
- It forces to store the data in XDG_DATA_DIR instead of XDG_CONFIG_DIR like it's done in practice. Going through the users of KRecentFilesAction I did not find any use case for allowing other file paths. Apps can still save multiple sets of recent docs by leveraging groups.
See T12246 for context.