[Component Chooser] Add ComboBox with browsers

Authored by broulik on Jul 26 2017, 10:02 AM.



This makes the dialog more user-friendly by providing a ComboBox with applications that can handle text/html (typically web browsers) instead of only providing a "guess contents" and "custom command" text field.

Test Plan



Verified that:

  • Checking "in an application based on contents" removes the BrowserApplication from kdeglobals
  • Selecting an application from the combo is properly saved and restored
  • Entering a custom command is properly saved and restored
  • When choosing a custom application (... button) but it is listed in the combobox, the "in the following application" is checked and the appropriate entry in the ComboBox selected
  • clicking links in KDE apps actually open in the desired application

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jul 26 2017, 10:02 AM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 26 2017, 10:02 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added inline comments.Jul 26 2017, 10:07 AM

One could also instead use

KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("'WebBrowser' in Categories"));

to really list only web browsers. (I wouldn't mind either), currently it lists all browsers I have plus Kate and Kwrite

dfaure accepted this revision.Jul 26 2017, 2:24 PM

Excellent idea.


I like this idea, it sounds more user-friendly indeed.

This revision is now accepted and ready to land.Jul 26 2017, 2:24 PM
This revision was automatically updated to reflect the committed changes.