> > Note that the least-porting-effort solution is self() and trader language, > since the code currently uses KServiceTypeTrader for this. > > But I'm tempted to say lambdas are nicer (you can debug the filtering more > easily), and would allow to kill the whole > trader-language-parser from kservice in KF6.
Looking briefly through the relevant Plasma code, lambda code would be definitely do-able and potentially cleaner in some places. There's some code in krunner that does a service type trader then does another filter on top. and notifications has a second iteration over retrieved results as kservicetypetrader can't handle X-Flatpak-RenamedFrom Plasma has 27 instances of KServiceTypeTrader::query("Application", someConstraint) so not a crazy amount of work, especially considering some are duplicates. Given we can gradually port from KServiceTypeTrader and have years to do it, I think it's worth it. David