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

Method editStyleWidget

plugins/astyle/astyle_plugin.cpp:317–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317SettingsWidgetPtr AStylePlugin::editStyleWidget(const QMimeType& mime) const
318{
319 AStylePreferences::Language lang = AStylePreferences::CPP;
320 if (mime.inherits(QStringLiteral("text/x-java")))
321 lang = AStylePreferences::Java;
322 else if (mime.inherits(QStringLiteral("text/x-csharp")))
323 lang = AStylePreferences::CSharp;
324 else if (mime.inherits(QStringLiteral("text/x-objcsrc")) || mime.inherits(QStringLiteral("text/x-objc++src"))) {
325 // x-objc++src *should* inherit x-objcsrc but that is not always the case in practice
326 lang = AStylePreferences::ObjC;
327 }
328 return SettingsWidgetPtr{new AStylePreferences(lang)};
329}
330
331QString AStylePlugin::previewText(const SourceFormatterStyle& /*style*/, const QMimeType& mime) const
332{

Callers 1

initMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected