Fix opening http links in browser
AbandonedPublic

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

Details

Reviewers
dfaure
davidedmundson
broulik
Group Reviewers
Dolphin
Summary

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

Repository
R318 Dolphin
Lint
Lint Skipped
Unit
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.

src/dolphinviewcontainer.cpp
656

Maybe call it launched?

dfaure added inline comments.Mar 2 2019, 11:37 PM
src/dolphinviewcontainer.cpp
661

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.
meven edited the summary of this revision. (Show Details)Jan 20 2020, 9:28 AM
meven edited the summary of this revision. (Show Details)

I guess this can be abandoned after D26732

davidedmundson requested changes to this revision.Apr 14 2020, 10:12 AM
davidedmundson added a subscriber: davidedmundson.

Marking as needs changes based on the two comments above to remove from review queue

This revision now requires changes to proceed.Apr 14 2020, 10:12 AM

@broulik Can you please abandon this one? Thanks!

elvisangelaccio commandeered this revision.Dec 28 2020, 4:49 PM
elvisangelaccio added a reviewer: broulik.

Closing.

elvisangelaccio abandoned this revision.Dec 28 2020, 4:49 PM