[Component Chooser] Add ComboBox with browsers
ClosedPublic

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

Details

Summary

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

Before


After

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

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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
kcms/componentchooser/componentchooserbrowser.cpp
85

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.

kcms/componentchooser/componentchooserbrowser.cpp
85

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.