CppEditor: Let users specify a preferred doxygen command prefix

Fixes: QTCREATORBUG-8096
Change-Id: I08bf4e3e0092fc775b50be6e5f4cefb9ed6979a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2023-08-08 17:02:38 +02:00
parent aa5b3b670e
commit 048f77b961
5 changed files with 112 additions and 46 deletions

View File

@@ -201,6 +201,12 @@ QString DoxygenGenerator::generate(QTextCursor cursor, DeclarationAST *decl)
QChar DoxygenGenerator::styleMark() const
{
switch (m_settings.commandPrefix) {
case TextEditor::CommentsSettings::CommandPrefix::At: return '@';
case TextEditor::CommentsSettings::CommandPrefix::Backslash: return '\\';
case TextEditor::CommentsSettings::CommandPrefix::Auto: break;
}
if (m_style == QtStyle || m_style == CppStyleA || m_style == CppStyleB)
return QLatin1Char('\\');
return QLatin1Char('@');