diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2020-01-15 19:10:34 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2020-01-20 20:56:57 +0000 |
commit | 24a25eed1481a7c563431d79e3ad07840c0f7125 (patch) | |
tree | 3eb8a56dac620a31e6af362bf7c03201ea645771 /src/plugins/glsleditor | |
parent | ad4040972b9d763b2ceaa7444d18e65dd3da2ee9 (diff) |
Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r-- | src/plugins/glsleditor/glslhighlighter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/glsleditor/glslhighlighter.cpp b/src/plugins/glsleditor/glslhighlighter.cpp index c21e2ab1dc..0ec949e05c 100644 --- a/src/plugins/glsleditor/glslhighlighter.cpp +++ b/src/plugins/glsleditor/glslhighlighter.cpp @@ -86,7 +86,7 @@ void GlslHighlighter::highlightBlock(const QString &text) if (tokens.isEmpty()) { setCurrentBlockState(previousState); TextDocumentLayout::clearParentheses(currentBlock()); - if (text.length()) // the empty line can still contain whitespace + if (!text.isEmpty()) // the empty line can still contain whitespace setFormat(0, text.length(), formatForCategory(C_VISUAL_WHITESPACE)); TextDocumentLayout::setFoldingIndent(currentBlock(), foldingIndent); return; |