Skip to content
Commit 411b415a authored by Igor Kushnir's avatar Igor Kushnir
Browse files

Reformat actions' UI: display a style's caption, not name

SourceFormatterStyle::name() is used as a KConfig key and never appears
in the UI. The names of user-defined styles are particularly
uninformative, e.g. "User4". SourceFormatterStyle::caption() is
consistently shown in the UI everywhere else.

Unfortunately, SourceFormatterController::styleForUrl() returns a
SourceFormatterStyle with only the name filled-in for predefined styles.
Retrieving the real caption of a predefined style requires moving
CustomScriptPlugin::predefinedStyle() to the base formatter class -
ISourceFormatter.

Rename AStylePlugin's helper function predefinedStyle() =>
createPredefinedStyle(). The old name coincided with the name of
base class ISourceFormatter's newly added member function. Make the
renamed function static: not used outside of the file it is defined in.
parent d8ab45cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment