- Instead of early returning in the match method if the list of recent documents is empty the matching is suspended.
- The imports have been cleaned up, redundant Q_UNUSED macros have been removed and the formatting has been changed.
- Instead of getting the action using the id, all the actions are returned (in this case just the one that is set in the constructor).
- The unnecessary comparison of the action has been removed and the replace method call uses a more performant overload.
Details
- Reviewers
davidedmundson ngraham broulik meven apol
Should compile and show the recent documents.
To test the suspendMatching: Clear the ~/.local/share/RecentDocuments folder, restart krunner.
There should be no results. Then open a file in dolphin and the file shows up as a query result in krunner.
Diff Detail
- Repository
- R120 Plasma Workspace
- Branch
- recentdocuments_cleanup (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 24691 Build 24709: arc lint + arc unit
Regarding the recentdocument krunner, I have a patch to make it rely on kactivity data : D26111. It has been waiting for review of a while.
This patch will introduce a lot of conflict, but I am ok either way, if this one get merged first.
Just a small nitpick on may part.
runners/recentdocuments/recentdocuments.cpp | ||
---|---|---|
107 β | (On Diff #79244) | You can replace with KShell::tildeCollapse for this if. |
I didn't knew this patch existed and that it introduces coneptual changes.
This is just a patch with smaller improvements/cleanup. Because of this I suggest waiting for your patch to be merged and than rebasing π.
To rebase after https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/31 lands
Well @alex https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/31 was merged, so if you are still up to do it, now is a good time to rebase your changes.