D28187: KIO DesktopExecParser: simplify code

Ahmad Samir noreply at phabricator.kde.org
Sun Mar 22 13:25:38 GMT 2020


ahmadsamir added a comment.


  Neat.
  
  The logic all seems to hold:
  
  We have no urls:
  
  - if it's a local file, useKioexec is false, and no fuse since "requests" will be empty
  - 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
  
  We have urls:
  
  - if proto is not in supported list, useKioexec is true:
    - if fuseError is true, use kioexec and return early
    - fuseError is false, at least one url can use fuse, go through for loop (on 384)
  
  - if proto is in supported list, useKioexec is false, which makes fuseError redundant (true/false && false -> false), so kioexec is out:
    - if it's a vlc-like situation, iterate over the urls and check fuse reply stuff
    - if it's a ktelnet-situation, "requests" is always empty, so no fuse is tried
  
  ("Complicated" is the least that can be said :D).
  
  And indeed it's not only vlc (continuing the discussion in my other abandoned diff):
  $ grep -r X-KDE-Protocols /usr/share/applications/
  /usr/share/applications/smplayer.desktop:X-KDE-Protocols=http,ftp,smb
  /usr/share/applications/startcenter.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs
  /usr/share/applications/calc.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs
  /usr/share/applications/mpv.desktop:X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
  /usr/share/applications/vlc.desktop:X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
  /usr/share/applications/writer.desktop:X-KDE-Protocols=file,http,ftp,webdav,webdavs

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D28187

To: dfaure, ahmadsamir, feverfew, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200322/5bf7ee6a/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list