diff options
author | Hugo Holgersson <hugo.holgersson@logikbyran.se> | 2016-07-17 00:29:33 +0200 |
---|---|---|
committer | Hugo Holgersson <hugo.holgersson@logikbyran.se> | 2017-11-28 12:54:29 +0000 |
commit | bf3c67e0d0e2e8daf91e07be6300a3e726cbd08b (patch) | |
tree | 103172f58f9a2167a699dc6be2694eafb7a3ebdd /src/plugins/texteditor/texteditorconstants.cpp | |
parent | e050622f5544bd578d5559b36d3545f9bca4d730 (diff) | |
download | qt-creator-bf3c67e0d0e2e8daf91e07be6300a3e726cbd08b.tar.gz |
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>
Diffstat (limited to 'src/plugins/texteditor/texteditorconstants.cpp')
-rw-r--r-- | src/plugins/texteditor/texteditorconstants.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/texteditorconstants.cpp b/src/plugins/texteditor/texteditorconstants.cpp index a3f4bcade4..0715275be5 100644 --- a/src/plugins/texteditor/texteditorconstants.cpp +++ b/src/plugins/texteditor/texteditorconstants.cpp @@ -101,8 +101,9 @@ const char *nameForStyle(TextStyle style) case C_WARNING: return "Warning"; case C_WARNING_CONTEXT: return "WarningContext"; - case C_DECLARATION: return "Declaration"; - case C_OUTPUT_ARGUMENT: return "OutputArgument"; + case C_DECLARATION: return "Declaration"; + case C_FUNCTION_DEFINITION: return "FunctionDefinition"; + case C_OUTPUT_ARGUMENT: return "OutputArgument"; case C_LAST_STYLE_SENTINEL: return "LastStyleSentinel"; } |