<table><tr><td style="">ahmadsamir added a comment.
</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/D28187">View Revision</a></tr></table><br /><div><div><p>Neat.</p>

<p>The logic all seems to hold:</p>

<p>We have no urls:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">if it's a local file, useKioexec is false, and no fuse since "requests" will be empty</li>
<li class="remarkup-list-item">if it's not a local file, useKioexec is true, and we try fuse; if there's an error with fuse fallback to kioexec and return early</li>
</ul>

<p>We have urls:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">if proto is not in supported list, useKioexec is true:<ul class="remarkup-list">
<li class="remarkup-list-item">if fuseError is true, use kioexec and return early</li>
<li class="remarkup-list-item">fuseError is false, at least one url can use fuse, go through for loop (on 384)</li>
</ul></li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">if proto is in supported list, useKioexec is false, which makes fuseError redundant (true/false && false -> false), so kioexec is out:<ul class="remarkup-list">
<li class="remarkup-list-item">if it's a vlc-like situation, iterate over the urls and check fuse reply stuff</li>
<li class="remarkup-list-item">if it's a ktelnet-situation, "requests" is always empty, so no fuse is tried</li>
</ul></li>
</ul>

<p>("Complicated" is the least that can be said :D).</p>

<p>And indeed it's not only vlc (continuing the discussion in my other abandoned diff):<br />
$ grep -r X-KDE-Protocols /usr/share/applications/<br />
/usr/share/applications/smplayer.desktop:X-KDE-Protocols=http,ftp,smb<br />
/usr/share/applications/startcenter.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs<br />
/usr/share/applications/calc.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs<br />
/usr/share/applications/mpv.desktop:X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb<br />
/usr/share/applications/vlc.desktop:X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb<br />
/usr/share/applications/writer.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28187">https://phabricator.kde.org/D28187</a></div></div><br /><div><strong>To: </strong>dfaure, ahmadsamir, feverfew, ngraham<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns<br /></div>