| 167 | } |
| 168 | |
| 169 | SourceFormatterStyle ISourceFormatter::predefinedStyle(const QString& name) const |
| 170 | { |
| 171 | const auto styles = predefinedStyles(); |
| 172 | const auto it = std::find_if(styles.cbegin(), styles.cend(), [&name](const SourceFormatterStyle& style) { |
| 173 | return style.name() == name; |
| 174 | }); |
| 175 | return it == styles.cend() ? SourceFormatterStyle{name} : *it; |
| 176 | } |
| 177 | |
| 178 | QString ISourceFormatter::optionMapToString(const QMap<QString, QVariant> &map) |
| 179 | { |