diff options
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glslhighlighter.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/plugins/glsleditor/glslhighlighter.cpp b/src/plugins/glsleditor/glslhighlighter.cpp index 122bb2e7ce..eed647e177 100644 --- a/src/plugins/glsleditor/glslhighlighter.cpp +++ b/src/plugins/glsleditor/glslhighlighter.cpp @@ -39,21 +39,20 @@ namespace Internal { GlslHighlighter::GlslHighlighter() { - static QVector<TextStyle> categories; - if (categories.isEmpty()) { - categories << C_NUMBER - << C_STRING - << C_TYPE - << C_KEYWORD - << C_OPERATOR - << C_PREPROCESSOR - << C_LABEL - << C_COMMENT - << C_DOXYGEN_COMMENT - << C_DOXYGEN_TAG - << C_VISUAL_WHITESPACE - << C_REMOVED_LINE; - } + static const QVector<TextStyle> categories({ + C_NUMBER, + C_STRING, + C_TYPE, + C_KEYWORD, + C_OPERATOR, + C_PREPROCESSOR, + C_LABEL, + C_COMMENT, + C_DOXYGEN_COMMENT, + C_DOXYGEN_TAG, + C_VISUAL_WHITESPACE, + C_REMOVED_LINE + }); setTextFormatCategories(categories); } |