MCPcopy Create free account
hub / github.com/KDE/kdevelop / createPredefinedStyle

Function createPredefinedStyle

plugins/astyle/astyle_plugin.cpp:281–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281static SourceFormatterStyle createPredefinedStyle(const QString& name, const QString& caption = QString())
282{
283 SourceFormatterStyle st = SourceFormatterStyle( name );
284 st.setCaption( caption.isEmpty() ? name : caption );
285 AStyleFormatter fmt;
286 fmt.predefinedStyle( name );
287 st.setContent( fmt.saveStyle() );
288 st.setMimeTypes(ISourceFormatter::mimeTypesSupportedByBuiltInStyles());
289 st.setUsePreview(true);
290 return st;
291}
292
293QVector<SourceFormatterStyle> AStylePlugin::predefinedStyles() const
294{

Callers 1

predefinedStylesMethod · 0.85

Calls 9

setCaptionMethod · 0.80
saveStyleMethod · 0.80
setMimeTypesMethod · 0.80
setUsePreviewMethod · 0.80
QStringClass · 0.50
isEmptyMethod · 0.45
predefinedStyleMethod · 0.45
setContentMethod · 0.45

Tested by

no test coverage detected