[KRun] Fall back to reading text/html in mimeapps.list if others aren't there
AbandonedPublic

Authored by ngraham on Feb 6 2019, 4:55 AM.

Details

Reviewers
dfaure
Group Reviewers
Frameworks
Summary

If System SettingsApplicationsDefault ApplicationsWeb Browser is using the setting "In an application based on the contents of the URL", then lookup can fail and pass the URL to the wrong app when no default app is set in kdeglobals and mimeapps.list has no x-scheme-handler/https or x-scheme-handler/http entries, but does have an entry for text/html.

This patch makes KRun additionally fall back to reading from text/html in mimeapps.list if it's present.

BUG: 403499
FIXED-IN: 5.56

Test Plan

Can now open URLs when using "In an application based on the contents of the URL when mimeapps.list only has an entry for text/html.

Diff Detail

Repository
R241 KIO
Branch
more-mimeapps-fallbacks (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7940
Build 7958: arc lint + arc unit
ngraham created this revision.Feb 6 2019, 4:55 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 6 2019, 4:55 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 6 2019, 4:55 AM
dfaure requested changes to this revision.Feb 6 2019, 7:59 AM

This makes no sense to me. The whole point of " based on the contents of the URL " is to open images in an image viewer, PDFs in a PDF viewer, etc.
So hardcoding text/html breaks this and opens everything in a webbrowser -- if that's what you want, set a browser app, not "based on the contents of the URL".

This revision now requires changes to proceed.Feb 6 2019, 7:59 AM
ngraham edited the summary of this revision. (Show Details)Feb 6 2019, 7:15 PM

Well in that case we need to figure out what's wrong in https://bugs.kde.org/show_bug.cgi?id=403499.

meven added a subscriber: meven.EditedJan 20 2020, 9:25 AM

I think you can abandon this one, because D26690 is fixing this.

ngraham abandoned this revision.Jan 21 2020, 1:07 AM

Thanks. :)