https://bugs.kde.org/show_bug.cgi?id=423302
Bug ID: 423302 Summary: Document in API for KRecentFilesAction::addAction that temp files are ignored Product: frameworks-kconfigwidgets Version: 5.70.0 Platform: Fedora RPMs OS: Linux Status: REPORTED Severity: wishlist Priority: NOR Component: general Assignee: kdelibs-b...@kde.org Reporter: rjwgn...@gmail.com Target Milestone: --- SUMMARY Developing an app which uses KRecentFilesAction, I did my debug testing storing a file in /tmp/xxx.json, where added it to a KRecentFilesAction, using addUrl(). When I went to the associated "Open Recent..." menu entry, and found it greyed out. Spent hours looking at the creation of the action (through KXmlGuiClien::actionCollection()->addAction() and other permutations). Finally looked at the source for KRecentFilesAction::addAction() and found where the code quietly discards files in the temp directory: if (url.isLocalFile() && url.toLocalFile().startsWith(QDir::tempPath())) { return; } While this makes some sense, "favors" done by the code should be documented. Some note to this effect should be in the API for the widget. STEPS TO REPRODUCE 1. create an app using a KRecentFilesAction action 2. add a QUrl to a local file stored in the temp path 3. wonder why it does not show up in the recent files list OBSERVED RESULT 1. File mysteriously does not show up in the recents list EXPECTED RESULT 1. It should not be a mystery, as behavior should be documented. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.