forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Leandro Melo
parent
f47a916c53
commit
33f8a42503
@@ -1765,8 +1765,8 @@ void CPPEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
|
|||||||
fs.toTextCharFormat(TextEditor::C_LOCAL);
|
fs.toTextCharFormat(TextEditor::C_LOCAL);
|
||||||
m_semanticHighlightFormatMap[SemanticInfo::FieldUse] =
|
m_semanticHighlightFormatMap[SemanticInfo::FieldUse] =
|
||||||
fs.toTextCharFormat(TextEditor::C_FIELD);
|
fs.toTextCharFormat(TextEditor::C_FIELD);
|
||||||
m_semanticHighlightFormatMap[SemanticInfo::StaticUse] =
|
m_semanticHighlightFormatMap[SemanticInfo::EnumerationUse] =
|
||||||
fs.toTextCharFormat(TextEditor::C_STATIC);
|
fs.toTextCharFormat(TextEditor::C_ENUMERATION);
|
||||||
m_semanticHighlightFormatMap[SemanticInfo::VirtualMethodUse] =
|
m_semanticHighlightFormatMap[SemanticInfo::VirtualMethodUse] =
|
||||||
fs.toTextCharFormat(TextEditor::C_VIRTUAL_METHOD);
|
fs.toTextCharFormat(TextEditor::C_VIRTUAL_METHOD);
|
||||||
m_semanticHighlightFormatMap[SemanticInfo::LabelUse] =
|
m_semanticHighlightFormatMap[SemanticInfo::LabelUse] =
|
||||||
|
@@ -485,7 +485,7 @@ bool CheckSymbols::visit(UsingDirectiveAST *)
|
|||||||
|
|
||||||
bool CheckSymbols::visit(EnumeratorAST *ast)
|
bool CheckSymbols::visit(EnumeratorAST *ast)
|
||||||
{
|
{
|
||||||
addUse(ast->identifier_token, SemanticInfo::StaticUse);
|
addUse(ast->identifier_token, SemanticInfo::EnumerationUse);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1163,7 +1163,7 @@ bool CheckSymbols::maybeAddTypeOrStatic(const QList<LookupItem> &candidates, Nam
|
|||||||
|
|
||||||
UseKind kind = SemanticInfo::TypeUse;
|
UseKind kind = SemanticInfo::TypeUse;
|
||||||
if (c->enclosingEnum() != 0)
|
if (c->enclosingEnum() != 0)
|
||||||
kind = SemanticInfo::StaticUse;
|
kind = SemanticInfo::EnumerationUse;
|
||||||
|
|
||||||
const Use use(line, column, length, kind);
|
const Use use(line, column, length, kind);
|
||||||
addUse(use);
|
addUse(use);
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
TypeUse,
|
TypeUse,
|
||||||
LocalUse,
|
LocalUse,
|
||||||
FieldUse,
|
FieldUse,
|
||||||
StaticUse,
|
EnumerationUse,
|
||||||
VirtualMethodUse,
|
VirtualMethodUse,
|
||||||
LabelUse,
|
LabelUse,
|
||||||
MacroUse,
|
MacroUse,
|
||||||
|
@@ -57,7 +57,9 @@ const char *nameForStyle(TextStyle style)
|
|||||||
case C_TYPE: return "Type";
|
case C_TYPE: return "Type";
|
||||||
case C_LOCAL: return "Local";
|
case C_LOCAL: return "Local";
|
||||||
case C_FIELD: return "Field";
|
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_VIRTUAL_METHOD: return "VirtualMethod";
|
||||||
case C_FUNCTION: return "Function";
|
case C_FUNCTION: return "Function";
|
||||||
case C_KEYWORD: return "Keyword";
|
case C_KEYWORD: return "Keyword";
|
||||||
|
@@ -56,7 +56,7 @@ enum TextStyle {
|
|||||||
C_TYPE,
|
C_TYPE,
|
||||||
C_LOCAL,
|
C_LOCAL,
|
||||||
C_FIELD,
|
C_FIELD,
|
||||||
C_STATIC,
|
C_ENUMERATION,
|
||||||
C_VIRTUAL_METHOD,
|
C_VIRTUAL_METHOD,
|
||||||
C_FUNCTION,
|
C_FUNCTION,
|
||||||
C_KEYWORD,
|
C_KEYWORD,
|
||||||
|
@@ -139,7 +139,7 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
|
|||||||
formatDescriptions.append(FormatDescription(C_TYPE, tr("Type"), Qt::darkMagenta));
|
formatDescriptions.append(FormatDescription(C_TYPE, tr("Type"), Qt::darkMagenta));
|
||||||
formatDescriptions.append(FormatDescription(C_LOCAL, tr("Local")));
|
formatDescriptions.append(FormatDescription(C_LOCAL, tr("Local")));
|
||||||
formatDescriptions.append(FormatDescription(C_FIELD, tr("Field"), Qt::darkRed));
|
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;
|
Format functionFormat;
|
||||||
formatDescriptions.append(FormatDescription(C_FUNCTION, tr("Function"), functionFormat));
|
formatDescriptions.append(FormatDescription(C_FUNCTION, tr("Function"), functionFormat));
|
||||||
|
Reference in New Issue
Block a user