From 33f8a42503e45ba1cd22a6b9adb4a7020cfe0b9d Mon Sep 17 00:00:00 2001 From: David Schulz <david.schulz@nokia.com> Date: Mon, 27 Aug 2012 10:42:42 +0200 Subject: [PATCH] Editor: rename "Static" in Font & Colors settings to more clearer "Enumeration" Change-Id: I785edb6d31a4cd6a0875549f80bcf791ad61587a Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Leandro Melo <leandro.melo@nokia.com> --- src/plugins/cppeditor/cppeditor.cpp | 4 ++-- src/plugins/cpptools/cppchecksymbols.cpp | 4 ++-- src/plugins/cpptools/cppsemanticinfo.h | 2 +- src/plugins/texteditor/texteditorconstants.cpp | 4 +++- src/plugins/texteditor/texteditorconstants.h | 2 +- src/plugins/texteditor/texteditorsettings.cpp | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 13eb6dcde77..85ef02020fb 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1765,8 +1765,8 @@ void CPPEditorWidget::setFontSettings(const TextEditor::FontSettings &fs) fs.toTextCharFormat(TextEditor::C_LOCAL); m_semanticHighlightFormatMap[SemanticInfo::FieldUse] = fs.toTextCharFormat(TextEditor::C_FIELD); - m_semanticHighlightFormatMap[SemanticInfo::StaticUse] = - fs.toTextCharFormat(TextEditor::C_STATIC); + m_semanticHighlightFormatMap[SemanticInfo::EnumerationUse] = + fs.toTextCharFormat(TextEditor::C_ENUMERATION); m_semanticHighlightFormatMap[SemanticInfo::VirtualMethodUse] = fs.toTextCharFormat(TextEditor::C_VIRTUAL_METHOD); m_semanticHighlightFormatMap[SemanticInfo::LabelUse] = diff --git a/src/plugins/cpptools/cppchecksymbols.cpp b/src/plugins/cpptools/cppchecksymbols.cpp index ab8efe5abfd..c24acc2f0e4 100644 --- a/src/plugins/cpptools/cppchecksymbols.cpp +++ b/src/plugins/cpptools/cppchecksymbols.cpp @@ -485,7 +485,7 @@ bool CheckSymbols::visit(UsingDirectiveAST *) bool CheckSymbols::visit(EnumeratorAST *ast) { - addUse(ast->identifier_token, SemanticInfo::StaticUse); + addUse(ast->identifier_token, SemanticInfo::EnumerationUse); return true; } @@ -1163,7 +1163,7 @@ bool CheckSymbols::maybeAddTypeOrStatic(const QList<LookupItem> &candidates, Nam UseKind kind = SemanticInfo::TypeUse; if (c->enclosingEnum() != 0) - kind = SemanticInfo::StaticUse; + kind = SemanticInfo::EnumerationUse; const Use use(line, column, length, kind); addUse(use); diff --git a/src/plugins/cpptools/cppsemanticinfo.h b/src/plugins/cpptools/cppsemanticinfo.h index f87feb334d1..5502a51b213 100644 --- a/src/plugins/cpptools/cppsemanticinfo.h +++ b/src/plugins/cpptools/cppsemanticinfo.h @@ -48,7 +48,7 @@ public: TypeUse, LocalUse, FieldUse, - StaticUse, + EnumerationUse, VirtualMethodUse, LabelUse, MacroUse, diff --git a/src/plugins/texteditor/texteditorconstants.cpp b/src/plugins/texteditor/texteditorconstants.cpp index 0cb6300e6c8..22ed20b8f11 100644 --- a/src/plugins/texteditor/texteditorconstants.cpp +++ b/src/plugins/texteditor/texteditorconstants.cpp @@ -57,7 +57,9 @@ const char *nameForStyle(TextStyle style) case C_TYPE: return "Type"; case C_LOCAL: return "Local"; case C_FIELD: return "Field"; - case C_STATIC: return "Static"; + // TODO: Rename "Static" to "Enumeration" in next major update, + // because renaming here would break styles defined by the user. + case C_ENUMERATION: return "Static"; case C_VIRTUAL_METHOD: return "VirtualMethod"; case C_FUNCTION: return "Function"; case C_KEYWORD: return "Keyword"; diff --git a/src/plugins/texteditor/texteditorconstants.h b/src/plugins/texteditor/texteditorconstants.h index e11e0a442db..c5956be707a 100644 --- a/src/plugins/texteditor/texteditorconstants.h +++ b/src/plugins/texteditor/texteditorconstants.h @@ -56,7 +56,7 @@ enum TextStyle { C_TYPE, C_LOCAL, C_FIELD, - C_STATIC, + C_ENUMERATION, C_VIRTUAL_METHOD, C_FUNCTION, C_KEYWORD, diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 5114e6e06f2..3c4ed91adc0 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -139,7 +139,7 @@ TextEditorSettings::TextEditorSettings(QObject *parent) formatDescriptions.append(FormatDescription(C_TYPE, tr("Type"), Qt::darkMagenta)); formatDescriptions.append(FormatDescription(C_LOCAL, tr("Local"))); formatDescriptions.append(FormatDescription(C_FIELD, tr("Field"), Qt::darkRed)); - formatDescriptions.append(FormatDescription(C_STATIC, tr("Static"), Qt::darkMagenta)); + formatDescriptions.append(FormatDescription(C_ENUMERATION, tr("Enumeration"), Qt::darkMagenta)); Format functionFormat; formatDescriptions.append(FormatDescription(C_FUNCTION, tr("Function"), functionFormat)); -- GitLab