Skip to content

[Location Runner] Also explicitly look for URL scheme handlers

Kai Uwe Broulik requested to merge work/location-runner-scheme-handler into master

KProtocolInfo handles only protocols KIO knows but apps can also register to be a URL scheme handler independently of this.

This patch makes the location runner also query for the preferred URL scheme handler when no known protocol is found. It also prefers the scheme handler over the helper protocol since a service has a name.

While at it, also format the protocol "exec" using DesktopExecParser to avoid showing placeholders like '%u' to the user. Also use PreferLocalFile for "go to".

CCBUG: 416257


@sitter @alex @dfaure

  • Pasted an rtmp:/ URL, now got offered to open int with VLC Screenshot_20201113_123625
  • Typing ssh://localhost offers to open a terminal window with SSH
  • Pasting a spotify URL offers to open with Spotify
  • http://www.example.com still goes the old way
  • Typing ~/foo still works
  • Typing ~/nonexistant now shows Go to "/home/kaiuwe/nonexistant" rather than Go to "file:///home/kaiuwe/nonexistant"
  • Happens to fix mailto but merely because Thunderbird is a mailto protocol handler, the underlying URI filter or KProtocolInfo bug is still there
  • Typing vnc:/foo now shows Launch with krdc instead of Launch with krdc '%u'

This helper protocol stuff sounds like something that was around before we had standard scheme handlers? :)

Edited by Kai Uwe Broulik

Merge request reports

Loading