Commit 3ab927ed authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Made the highlighting for virtual methods configurable

parent 3ae8ddf1
...@@ -1742,8 +1742,7 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs) ...@@ -1742,8 +1742,7 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
m_localFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_LOCAL)); m_localFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_LOCAL));
m_fieldFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_FIELD)); m_fieldFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_FIELD));
m_keywordFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_KEYWORD)); m_keywordFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_KEYWORD));
m_virtualMethodFormat = fs.toTextCharFormat(QLatin1String(TextEditor::Constants::C_VIRTUAL_METHOD));
m_virtualMethodFormat.setFontItalic(true); // ### hardcoded
// only set the background, we do not want to modify foreground properties set by the syntax highlighter or the link // only set the background, we do not want to modify foreground properties set by the syntax highlighter or the link
m_occurrencesFormat.clearForeground(); m_occurrencesFormat.clearForeground();
......
...@@ -110,6 +110,7 @@ const char * const C_STRING = "String"; ...@@ -110,6 +110,7 @@ const char * const C_STRING = "String";
const char * const C_TYPE = "Type"; const char * const C_TYPE = "Type";
const char * const C_LOCAL = "Local"; const char * const C_LOCAL = "Local";
const char * const C_FIELD = "Field"; const char * const C_FIELD = "Field";
const char * const C_VIRTUAL_METHOD = "VirtualMethod";
const char * const C_KEYWORD = "Keyword"; const char * const C_KEYWORD = "Keyword";
const char * const C_OPERATOR = "Operator"; const char * const C_OPERATOR = "Operator";
const char * const C_PREPROCESSOR = "Preprocessor"; const char * const C_PREPROCESSOR = "Preprocessor";
......
...@@ -128,6 +128,11 @@ TextEditorSettings::TextEditorSettings(QObject *parent) ...@@ -128,6 +128,11 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescriptions.append(FormatDescription(QLatin1String(C_TYPE), tr("Type"), Qt::darkMagenta)); formatDescriptions.append(FormatDescription(QLatin1String(C_TYPE), tr("Type"), Qt::darkMagenta));
formatDescriptions.append(FormatDescription(QLatin1String(C_LOCAL), tr("Local"))); formatDescriptions.append(FormatDescription(QLatin1String(C_LOCAL), tr("Local")));
formatDescriptions.append(FormatDescription(QLatin1String(C_FIELD), tr("Field"), Qt::darkRed)); formatDescriptions.append(FormatDescription(QLatin1String(C_FIELD), tr("Field"), Qt::darkRed));
FormatDescription virtualMethodFormatDescriptor(QLatin1String(C_VIRTUAL_METHOD), tr("Virtual Method"));
virtualMethodFormatDescriptor.format().setItalic(true);
formatDescriptions.append(virtualMethodFormatDescriptor);
formatDescriptions.append(FormatDescription(QLatin1String(C_KEYWORD), tr("Keyword"), Qt::darkYellow)); formatDescriptions.append(FormatDescription(QLatin1String(C_KEYWORD), tr("Keyword"), Qt::darkYellow));
formatDescriptions.append(FormatDescription(QLatin1String(C_OPERATOR), tr("Operator"))); formatDescriptions.append(FormatDescription(QLatin1String(C_OPERATOR), tr("Operator")));
formatDescriptions.append(FormatDescription(QLatin1String(C_PREPROCESSOR), tr("Preprocessor"), Qt::darkBlue)); formatDescriptions.append(FormatDescription(QLatin1String(C_PREPROCESSOR), tr("Preprocessor"), Qt::darkBlue));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment