To replace the actionCollection() method. This will allow us to get rid of the KActionCollection and thus KXmlGui dependency
Details
- Reviewers
dfaure - Group Reviewers
Frameworks - Maniphest Tasks
- T12205: Port KDirOperator away from KActionCollection
Tested with patches for KDevelop (https://invent.kde.org/kde/kdevelop/merge_requests/83/), Kate (https://invent.kde.org/kde/kate/merge_requests/54) and Kile (D26426)
Diff Detail
- Repository
- R241 KIO
- Branch
- kac
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 20633 Build 20651: arc lint + arc unit
What's the point of removing the KXMLGui dependency?
I mean it's not like you will be able to do Kate or KDevelop without kxmlgui, no?
The goal is to remove the overall dependencies of KIO. There are multiple apps/other frameworks that use KIO without using KXmlGui.
src/filewidgets/kdiroperator.h | ||
---|---|---|
428 | Imho the API documentation should be improved (I am aware it was copied). Returns a map of all available actions. The action map remains unchanged throughout the entire lifetime of the diroperator instance. The key of the map can be used to obtain the respective action. The full list of available actions is as follows: - popupMenu: ... - up: ... |
Why are we using a string instead of an enum?
It's not like this is KXMLGui where people can define their own actions, is it?
Interesting suggestion. We're used to using names for actions everywhere, but in this specific case an enum would do indeed.
When this is ported away from KActionCollection in the future, one should remember to do action->setObjectName("...") for code that actually wants strings (like KActionCollection).
src/filewidgets/kdiroperator.h | ||
---|---|---|
428 | Personally I would add an enum of static strings, so that user code can discover easily the features and that the documentation follows the code more easily. |
src/filewidgets/kdiroperator.h | ||
---|---|---|
428 | What's an enum of strings? You mean just an enum, right? |
ping @nicolasfella
src/filewidgets/kdiroperator.h | ||
---|---|---|
425 | Mark it deprecated / add a // KF6 TODO remove ? |