forked from qt-creator/qt-creator
Customizable doxy formats.
This commit is contained in:
@@ -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);
|
||||
|
@@ -51,6 +51,8 @@ enum CppFormats {
|
||||
CppPreprocessorFormat,
|
||||
CppLabelFormat,
|
||||
CppCommentFormat,
|
||||
CppDoxygenCommentFormat,
|
||||
CppDoxygenTagFormat,
|
||||
NumCppFormats
|
||||
};
|
||||
|
||||
|
@@ -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('\\') ||
|
||||
|
@@ -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";
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user