<table><tr><td style="">nicolasfella created this revision.<br />nicolasfella added reviewers: Frameworks, dfaure.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />nicolasfella requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26448">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>
<p>KRecentFilesMenu is different in the following ways:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">It lives in KWidgetAddons and thus in Tier 1. With Qt6 and QGuiAction/QGuiMenu it could even go to KGuiAddons</li>
<li class="remarkup-list-item">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</li>
<li class="remarkup-list-item">Instead of using KSelectAction it uses/is a QMenu</li>
<li class="remarkup-list-item">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.</li>
</ul>
<p>See <a href="https://phabricator.kde.org/T12246" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">T12246</a> for context.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tested with a patch for Ark</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R236 KWidgetsAddons</div></div></div><br /><div><strong>BRANCH</strong><div><div>recentfilemenu</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26448">https://phabricator.kde.org/D26448</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/krecentfilesmenu.cpp<br />
src/krecentfilesmenu.h</div></div></div><br /><div><strong>To: </strong>nicolasfella, Frameworks, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>