GLSLEditor: Add missing parentheses

They're inside #if 0 so nobody noticed.

Detected by lupdate

Change-Id: I6a3dc8192f71dbdf675757d9ff71bad6a4adec4b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-22 22:47:56 +03:00
committed by Orgad Shaneh
parent 3dfe728272
commit cf31323f14

View File

@@ -367,15 +367,15 @@ void Highlighter::highlightBlock(const QString &text)
const GLSL::Token &tk = tokens.at(i);
if (tk.is(GLSL::Parser::T_NUMBER)) {
setFormat(tk.position, tk.length, formatForCategory(GLSLNumberFormat);
setFormat(tk.position, tk.length, formatForCategory(GLSLNumberFormat));
} else if (tk.is(GLSL::Parser::T_COMMENT)) {
setFormat(tk.position, tk.length, Qt::darkGreen); // ### FIXME: formatForCategory(GLSLCommentFormat);
} else if (tk.is(GLSL::Parser::T_IDENTIFIER)) {
int kind = lex.findKeyword(data.constData() + tk.position, tk.length);
if (kind == GLSL::Parser::T_RESERVED)
setFormat(tk.position, tk.length, formatForCategory(GLSLReservedKeyword);
setFormat(tk.position, tk.length, formatForCategory(GLSLReservedKeyword));
else if (kind != GLSL::Parser::T_IDENTIFIER)
setFormat(tk.position, tk.length, formatForCategory(GLSLKeywordFormat);
setFormat(tk.position, tk.length, formatForCategory(GLSLKeywordFormat));
} else if (tk.is(GLSL::Parser::T_LEFT_PAREN) || tk.is(GLSL::Parser::T_LEFT_BRACE) || tk.is(GLSL::Parser::T_LEFT_BRACKET)) {
const QChar c = text.at(tk.begin());
parentheses.append(Parenthesis(Parenthesis::Opened, c, tk.begin()));