| 750 | } |
| 751 | |
| 752 | void SourceFormatterSelectionEditPrivate::addMimeTypes(const SourceFormatterStyle::MimeList& mimeTypes, |
| 753 | FormatterData& formatter) |
| 754 | { |
| 755 | for (const auto& item : mimeTypes) { |
| 756 | QMimeType mime = QMimeDatabase().mimeTypeForName(item.mimeType); |
| 757 | if (!mime.isValid()) { |
| 758 | qCWarning(SHELL) << "formatter plugin" << formatter.name() << "supports unknown MIME type entry" |
| 759 | << item.mimeType; |
| 760 | continue; |
| 761 | } |
| 762 | auto& lang = addSupportingFormatterToLanguage(item.highlightMode, formatter); |
| 763 | lang.addMimeType(std::move(mime)); |
| 764 | } |
| 765 | } |
| 766 | |
| 767 | LanguageSettings& SourceFormatterSelectionEditPrivate::addSupportingFormatterToLanguage(const QString& languageName, |
| 768 | FormatterData& formatter) |
no test coverage detected