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