<table><tr><td style="">mpyne created this revision.<br />mpyne added a reviewer: Frameworks.<br />Restricted Application added a project: Frameworks.
</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/D8002" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When we adopted JSON plugin metadata for services, we also included compatibility code so that we could continue to load the older Desktop Entry format for KDE services (looks to me that we convert it on the fly so that the application code can just use everything as if it were from the JSON-based service metadata).</p>
<p>To make sure we find any legacy .desktop files for service types, we have to know their name based on their service type, so that we can load the .desktop file and add their metadata to the options we maintain for each service type definition. IIRC we could use KSycoca in kdelibs4 to find the right service type metadata, even without knowing the source desktop file entry, but we don't have KSycoca anymore so we have to look up likely .desktop files ourselves.</p>
<p>The heuristic we currently use maps any <tt style="background: #ebebeb; font-size: 13px;">/</tt> characters to a <tt style="background: #ebebeb; font-size: 13px;">-</tt>, so that a request for something like <tt style="background: #ebebeb; font-size: 13px;">KWin/Effect</tt> service types would map to <tt style="background: #ebebeb; font-size: 13px;">kservicetypes5/kwin-effect.desktop</tt> when searching for the .desktop file.</p>
<p>This heuristic doesn't find all likely desktop entry candidates though. In particular it fails for <tt style="background: #ebebeb; font-size: 13px;">KWin/Effect</tt> (which is really at <tt style="background: #ebebeb; font-size: 13px;">kservicetypes5/kwineffect.desktop</tt>).</p>
<p>This change modifies the legacy lookup code path to search first for the existing heuristic, and if that fails to search by an additional heuristic that does the exact same thing but mapping <tt style="background: #ebebeb; font-size: 13px;">/</tt> to nothing instead.</p>
<p>See also <a href="https://bugs.kde.org/show_bug.cgi?id=384037" class="remarkup-link" target="_blank" rel="noreferrer">bug 384037</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Running System Settings and playing with the KWin Desktop Effects KCMs no longer spams the console with warnings about missing service types. Nothing else in the desktop seems to have been broken either. But I haven't found a much better way to test.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8002" rel="noreferrer">https://phabricator.kde.org/D8002</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/lib/plugin/desktopfileparser.cpp</div></div></div><br /><div><strong>To: </strong>mpyne, Frameworks<br /></div>