TextEditor: Implement highlighting of function definitions

This allows users to style function names at their definitions.

Once set, the XML-style token "FunctionDefinition" will
highlight all function definitions: the style option is a
mixin to Function and Virtual Function.

TEST=Default themes and locally hacked themes that lack Function,
FunctionDefinition, Declaration-styling look as they did before
this patch.

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I49d8e401211bdf28ff74699feac16fe98f6d64ce
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Hugo Holgersson
2016-07-17 00:29:33 +02:00
parent e050622f55
commit bf3c67e0d0
12 changed files with 85 additions and 14 deletions

View File

@@ -63,6 +63,8 @@ TextEditor::TextStyle toTextStyle(ClangBackEnd::HighlightingType type)
return TextEditor::C_PREPROCESSOR;
case HighlightingType::Declaration:
return TextEditor::C_DECLARATION;
case HighlightingType::FunctionDefinition:
return TextEditor::C_FUNCTION_DEFINITION;
case HighlightingType::OutputArgument:
return TextEditor::C_OUTPUT_ARGUMENT;
case HighlightingType::Operator: