* @return the name of kate indentation mode for @p mime, e.g. "cstyle", "python" */
| 506 | * @return the name of kate indentation mode for @p mime, e.g. "cstyle", "python" |
| 507 | */ |
| 508 | static QString indentationMode(const QMimeType& mime) |
| 509 | { |
| 510 | if (mime.inherits(QStringLiteral("text/x-c++src")) || mime.inherits(QStringLiteral("text/x-chdr")) || |
| 511 | mime.inherits(QStringLiteral("text/x-c++hdr")) || mime.inherits(QStringLiteral("text/x-csrc")) || |
| 512 | mime.inherits(QStringLiteral("text/x-java")) || mime.inherits(QStringLiteral("text/x-csharp"))) { |
| 513 | return QStringLiteral("cstyle"); |
| 514 | } |
| 515 | return QStringLiteral("none"); |
| 516 | } |
| 517 | |
| 518 | QString SourceFormatterController::FileFormatter::addModeline(QString input) const |
| 519 | { |