<table><tr><td style="">hein created this revision.<br />hein added reviewers: broulik, davidedmundson.<br />Restricted Application added a project: Plasma.<br />hein requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D13073">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The overall mission of TaskTools::windowUrlFromMetadata is to use<br />
various pieces of metadata to run KServiceTypeTrader queries and<br />
get a list of matching services. Sometimes this will find more than<br />
one service. So far we simply used whatever KServiceTypeTrader<br />
returned first, but in some cases we can and should do better. The<br />
included lengthy code comment names an example case.</p>
<p>In concert with <a href="https://phabricator.kde.org/D13058" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D13058</a>, this allows both the Linux-native and Wine-<br />
installed (S|s)team.desktop files to coexist and their windows be<br />
correctly mapped to the relevant .desktop file, by exploiting that<br />
by their nature each case ends up with a different KService::menuId()<br />
(that this is useful for differentiation is why the menuId differs,<br />
after all).</p>
<p>This change looks like it introduces disgusting complexity at first,<br />
but in some sense, trying to pick the most match-y out of the found<br />
services instead of just randomly picking the first one makes sense.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>Plasma/5.12</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13073">https://phabricator.kde.org/D13073</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>libtaskmanager/tasktools.cpp</div></div></div><br /><div><strong>To: </strong>hein, broulik, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>