New query mechanism for applications: KApplicationTrader

Authored by dfaure on Mar 4 2020, 10:48 PM.

Description

New query mechanism for applications: KApplicationTrader

Summary:
KMimeTypeTrader and KServiceTypeTrader could lookup both applications and
plugins, but plugins should nowadays be loaded via their JSON file
(KPluginLoader), no desktop-file trader needed anymore. Except maybe for non-C++ plugins?

KApplicationTrader gets rid of plugins and servicetypes from the API, in
order to keep only the API to look up application desktop files.

The trader query language is no longer used, as discussed on
kde-frameworks-devel; instead we use a std::function for filtering, like
KPluginLoader.

This commit also adds KApplicationTrader::isSubsequence, necessary to
replace the subseq operator of the trader query language.

Test Plan:
New unittest (initially based on kservicetest, simplified, ported
to lambdas, and with some new types of checks) passes

Reviewers: broulik, mart, vkrause, nicolasfella, aacid, davidedmundson, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: Frameworks

Maniphest Tasks: T12175

Differential Revision: https://phabricator.kde.org/D25698