>
> 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 kse
El diumenge, 12 de gener de 2020, a les 11:50:03 CET, David Faure va escriure:
> I wrote a KApplicationTrader class in https://phabricator.kde.org/D25698
> and I need input on API.
>
> Use case: the user types "km" in krunner.
> In order to find all applications that contain "km" (case insensitive
> auto filter = [](const KService::Ptr &service) { return
> service->name().contains("km", Qt::CaseInsensitive); } auto offers =
> KApplicationTrader::self()->query(filter);
I'd vote for lambda/function object/callable (hello std::invoke in KF6?). If a
more terse syntax is needed, it could be lat