expand window->desktopentry mapping heuristics to attempt RDN matching
ClosedPublic

Authored by sitter on Apr 19 2016, 12:31 PM.

Details

Summary

When no match can be made from classClass, attempt a fallback where we
match any DesktopEntryName that contains classClass and drop all that
do not end with '.$classClass' (i.e. ones that certainly are not using
reverse-domain-name notation. classClass is usually the appname, but
without RDN.
So, when a RDN using application cannot be matched directly (i.e. its
classClass is different from its binary name) we'd end up with an
unsuccessful mapping and use the binary-path as launcherUrl. To improve
on this when that case occurs we now attempt to loosely find a single
matching RDN desktop file and prefer that over the binary fallback match.

Illustrative example:

  • org.kde.dragonplayer.desktop
  • binary is 'dragon'
  • qapp appname and thus classClass is 'dragonplayer'
  • classClass cannot directly match the desktop file because of RDN
  • classClass also cannot match the binary because of name mismatch
  • now *.classClass can match org.kde.dragonplayer though

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter updated this revision to Diff 3422.Apr 19 2016, 12:31 PM
sitter retitled this revision from to expand window->desktopentry mapping heuristics to attempt RDN matching.
sitter updated this object.
sitter edited the test plan for this revision. (Show Details)
sitter added a reviewer: hein.
Restricted Application added a project: Plasma. · View Herald TranscriptApr 19 2016, 12:31 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein requested changes to this revision.Apr 19 2016, 12:36 PM
hein edited edge metadata.
hein added inline comments.
libtaskmanager/taskitem.cpp
716

"that is be" is wrong grammar.

Adding the Dragon example to the comment could actually help a reader.

726

Let's be verbose and document the concern that leads us to do this check!

This revision now requires changes to proceed.Apr 19 2016, 12:36 PM
sitter updated this revision to Diff 3423.Apr 19 2016, 12:43 PM
sitter edited edge metadata.

refine documentation

sitter updated this revision to Diff 3424.Apr 19 2016, 12:50 PM
sitter edited edge metadata.

improve comment a bit more. previous comment didn't really explain why more than one match can appear

hein accepted this revision.Apr 19 2016, 12:59 PM
hein edited edge metadata.
This revision is now accepted and ready to land.Apr 19 2016, 12:59 PM
This revision was automatically updated to reflect the committed changes.