Introduce a HasLauncher data role.

Authored by hein on Apr 19 2017, 10:38 AM.

Description

Introduce a HasLauncher data role.

Summary:
This is implemented by TasksModel and allows clients to reliably
query whether a row has an associated launcher. Useful for things
like Pin/Unpin action state or layout decisions.

Previously clients would have to reimplement something like
TaskTools::appsMatch on top of the model, which we absolutely do
not want to do - there should only be one copy of the app matching
logic for consistency's sake. In practice clients would do things
like fetch LauncherUrl and run it by launcherPosition(), which
omits appsMatch's AppId comparision, as an example of such unwated
drift. This approach also avoids the large performance overhead
involved.

The role is not implemented by the single-type or munging tasks
models as it has no use there.

Reviewers: Plasma, davidedmundson

Subscribers: plasma-devel

Tags: Plasma

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

Details

Committed
heinApr 20 2017, 11:01 AM
Differential Revision
D5504: Introduce a HasLauncher data role.
Parents
R120:0c9255510a67: [Lock Screen] Enforce plainText for media controls
Branches
Unknown
Tags
Unknown