Fix coding style for else statements

Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Orgad Shaneh
2013-07-17 00:01:45 +03:00
committed by Orgad Shaneh
parent c67f7f6349
commit ad9e7ccab6
101 changed files with 331 additions and 470 deletions

View File

@@ -160,13 +160,11 @@ void CppHighlighter::highlightBlock(const QString &text)
onlyHighlightComments = true;
}
} else if (tk.is(T_NUMERIC_LITERAL))
} else if (tk.is(T_NUMERIC_LITERAL)) {
setFormat(tk.begin(), tk.length(), m_formats[CppNumberFormat]);
else if (tk.isStringLiteral() || tk.isCharLiteral())
} else if (tk.isStringLiteral() || tk.isCharLiteral()) {
highlightLine(text, tk.begin(), tk.length(), m_formats[CppStringFormat]);
else if (tk.isComment()) {
} else if (tk.isComment()) {
const int startPosition = initialState ? previousTokenEnd : tk.begin();
if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT))
highlightLine(text, startPosition, tk.end() - startPosition, m_formats[CppCommentFormat]);
@@ -192,18 +190,15 @@ void CppHighlighter::highlightBlock(const QString &text)
initialState = 0;
}
} else if (tk.isKeyword() || CppTools::isQtKeyword(text.midRef(tk.begin(), tk.length())) || tk.isObjCAtKeyword())
} else if (tk.isKeyword() || CppTools::isQtKeyword(text.midRef(tk.begin(), tk.length())) || tk.isObjCAtKeyword()) {
setFormat(tk.begin(), tk.length(), m_formats[CppKeywordFormat]);
else if (tk.isOperator())
} else if (tk.isOperator()) {
setFormat(tk.begin(), tk.length(), m_formats[CppOperatorFormat]);
else if (i == 0 && tokens.size() > 1 && tk.is(T_IDENTIFIER) && tokens.at(1).is(T_COLON))
} else if (i == 0 && tokens.size() > 1 && tk.is(T_IDENTIFIER) && tokens.at(1).is(T_COLON)) {
setFormat(tk.begin(), tk.length(), m_formats[CppLabelFormat]);
else if (tk.is(T_IDENTIFIER))
} else if (tk.is(T_IDENTIFIER)) {
highlightWord(text.midRef(tk.begin(), tk.length()), tk.begin(), tk.length());
}
}
// mark the trailing white spaces