diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index b0eb63ffe351815daf1204615af0eaaf28dd7bea..a9f88d03cc40540c51c40d92af1871a3e9bbd8aa 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -740,7 +740,9 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs) << QLatin1String(TextEditor::Constants::C_OPERATOR) << QLatin1String(TextEditor::Constants::C_PREPROCESSOR) << QLatin1String(TextEditor::Constants::C_LABEL) - << QLatin1String(TextEditor::Constants::C_COMMENT); + << QLatin1String(TextEditor::Constants::C_COMMENT) + << QLatin1String(TextEditor::Constants::C_DOXYGEN_COMMENT) + << QLatin1String(TextEditor::Constants::C_DOXYGEN_TAG); } const QVector<QTextCharFormat> formats = fs.toTextCharFormats(categories); diff --git a/src/plugins/cppeditor/cppeditorenums.h b/src/plugins/cppeditor/cppeditorenums.h index 9b4ce75c0d79554ba8e76a7c8c29a9ca1971c6f0..5bca558ebfa1b6c20b5294e7779d46e459abb91e 100644 --- a/src/plugins/cppeditor/cppeditorenums.h +++ b/src/plugins/cppeditor/cppeditorenums.h @@ -51,6 +51,8 @@ enum CppFormats { CppPreprocessorFormat, CppLabelFormat, CppCommentFormat, + CppDoxygenCommentFormat, + CppDoxygenTagFormat, NumCppFormats }; diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index a02d3fe090020c1d33fab77869c11954c5d879d2..657967a3ce0fbeb185a5b6d3623d991795b7c049 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -329,10 +329,8 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position, const QChar *uc = text.unicode(); const QChar *it = uc + position; - QTextCharFormat format = m_formats[CppCommentFormat]; - QTextCharFormat kwFormat = format; - kwFormat.setFontWeight(QFont::Bold); - kwFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline); + const QTextCharFormat &format = m_formats[CppDoxygenCommentFormat]; + const QTextCharFormat &kwFormat = m_formats[CppDoxygenTagFormat]; while (! it->isNull()) { if (it->unicode() == QLatin1Char('\\') || diff --git a/src/plugins/texteditor/texteditorconstants.h b/src/plugins/texteditor/texteditorconstants.h index 7db120f144a8bfc04176a4773e421c0f7aa1a206..0dfbf8fb5e13f6e6ffc3e97e7e918e082488cd9b 100644 --- a/src/plugins/texteditor/texteditorconstants.h +++ b/src/plugins/texteditor/texteditorconstants.h @@ -84,6 +84,9 @@ const char * const C_OPERATOR = "Operator"; const char * const C_PREPROCESSOR = "Preprocessor"; const char * const C_LABEL = "Label"; const char * const C_COMMENT = "Comment"; +const char * const C_DOXYGEN_COMMENT = "Doxygen.Comment"; +const char * const C_DOXYGEN_TAG = "Doxygen.Tag"; + const char * const C_DISABLED_CODE = "DisabledCode"; const char * const C_ADDED_LINE = "AddedLine"; diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index a8f6019597dce27bbe0d74a3c2c1dedcf2594687..ff28af347c6a8bf53a3a93329bda50f4d60972ec 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -84,6 +84,8 @@ TextEditorSettings::TextEditorSettings(QObject *parent) formatDescriptions.push_back(FormatDescription(QLatin1String(C_PREPROCESSOR), tr("Preprocessor"), Qt::darkBlue)); formatDescriptions.push_back(FormatDescription(QLatin1String(C_LABEL), tr("Label"), Qt::darkRed)); formatDescriptions.push_back(FormatDescription(QLatin1String(C_COMMENT), tr("Comment"), Qt::darkGreen)); + formatDescriptions.push_back(FormatDescription(QLatin1String(C_DOXYGEN_COMMENT), tr("Doxygen Comment"), Qt::darkBlue)); + formatDescriptions.push_back(FormatDescription(QLatin1String(C_DOXYGEN_TAG), tr("Doxygen Tag"), Qt::blue)); formatDescriptions.push_back(FormatDescription(QLatin1String(C_DISABLED_CODE), tr("Disabled Code"), Qt::gray)); // Diff categories