forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user