Port KFileItemActions away from trader constraints
Open, Needs TriagePublic

Description

Some methods in KFileItemActions accept trader-language contraints. However we generally move away from using that in favor of C++ filter callbacks and the classes that take these constraints (KServiceTypeTrader, KMimeTypeTrader, KPluginTrader etc) are getting deprecated.

Looking at the usage of KFileItemActions::addOpenWithActionsTo() (and the other methods in that class), that it's basically used as "show all apps" or "show all apps except the current app", so adding an overload that takes a string list of "apps to exclude" could work.

Alternatively (or we add two overloads?) we could add an overload that takes a FilterFunc, but that could be overkill, since in all those years traderConstraint is mostly used to exclude some app, usually the current app.

alex claimed this task.Apr 18 2021, 3:26 PM
alex moved this task from Backlog to In Progress on the KF6 board.Apr 20 2021, 10:51 AM