Fix opening http links in browser
Needs ReviewPublic

Authored by broulik on Feb 8 2019, 8:20 AM.


Group Reviewers

When trying to open an http(s) link in Dolphin, the webbrowser should be launched instead.
The codepath didn't take into account that it can be either a service or (when prefixed by an exclamation mark) an exec path. This had it try to exec the name of a desktop file which obviously didn't work.
The fallback to Konqueror is removed as its file viewer is just a Dolphin Part and it isn't installed by default these days anymore.
BUG: 372642

Test Plan

Set Browser to chromium.desktop, entered http URL, now it worked, before it said "command chromium.desktop was not found".
Set Browser to some console command, entered http URL, console command was executed
Didn't find a protocol that Dolphin couldn't handle but wasn't http (where the previous Konqueror fallback would kick in, gopher:/ perhaps? :)

Browsing file systems, zip folders, camera:/ still works

Diff Detail

R318 Dolphin
Lint Skipped
Unit Tests Skipped
broulik created this revision.Feb 8 2019, 8:20 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptFeb 8 2019, 8:20 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
broulik requested review of this revision.Feb 8 2019, 8:20 AM

You can definitely try with kio-gopher :)

This patch works for me FWIW.

+1 otherwise.
Would be nice if we manage to not keep the http link in the URL navigator, but that's probably an unrelated issue.


Maybe call it launched?

dfaure added inline comments.Mar 2 2019, 11:37 PM

Err why all this code here?
This is KRun's job.

Why not just use KRun here? For instance KRun::runUrl.

Or is the problem that KRun pops up message boxes? We need to make that configurable then, instead of duplicating the various cases for BrowserApplication.

meven edited the summary of this revision. (Show Details)Nov 12 2019, 1:39 PM
meven added a subscriber: meven.