CppEditor: De-obfuscate DoxygenGenerator

- m_startComment was always false.
- One of the two public generate() functions is an internal helper.

Change-Id: I03a860bf7f44aab8f98c5656bc2b36f9fe5e1ef2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2023-08-08 10:44:48 +02:00
parent c6587de684
commit 68c76e072d
3 changed files with 1 additions and 30 deletions

View File

@@ -29,11 +29,6 @@ void DoxygenGenerator::setStyle(DocumentationStyle style)
m_style = style;
}
void DoxygenGenerator::setStartComment(bool start)
{
m_startComment = start;
}
void DoxygenGenerator::setGenerateBrief(bool get)
{
m_generateBrief = get;
@@ -136,8 +131,6 @@ QString DoxygenGenerator::generate(QTextCursor cursor, DeclarationAST *decl)
assignCommentOffset(cursor);
QString comment;
if (m_startComment)
writeStart(&comment);
writeNewLine(&comment);
writeContinuation(&comment);
@@ -221,13 +214,6 @@ QString DoxygenGenerator::generate(QTextCursor cursor, DeclarationAST *decl)
return comment;
}
QChar DoxygenGenerator::startMark() const
{
if (m_style == QtStyle)
return QLatin1Char('!');
return QLatin1Char('*');
}
QChar DoxygenGenerator::styleMark() const
{
if (m_style == QtStyle || m_style == CppStyleA || m_style == CppStyleB)
@@ -246,16 +232,6 @@ QString DoxygenGenerator::commandSpelling(Command command)
return QLatin1String("brief ");
}
void DoxygenGenerator::writeStart(QString *comment) const
{
if (m_style == CppStyleA)
comment->append(QLatin1String("///"));
if (m_style == CppStyleB)
comment->append(QLatin1String("//!"));
else
comment->append(offsetString() + "/*" + startMark());
}
void DoxygenGenerator::writeEnd(QString *comment) const
{
if (m_style == CppStyleA)