From 21843d6326e107acf21d7a7649b7d226d4a3761a Mon Sep 17 00:00:00 2001
From: Bill King <bill.king@nokia.com>
Date: Fri, 25 Jun 2010 14:12:01 +1000
Subject: [PATCH] Disambiguate the second logical test.

The second line test could be misread by both the compiler or the reader.
gcc even warns about this, so add brackets just to make sure.
---
 src/plugins/cppeditor/cpphighlighter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index 8a976fcb634..9637a72c233 100644
--- a/src/plugins/cppeditor/cpphighlighter.cpp
+++ b/src/plugins/cppeditor/cpphighlighter.cpp
@@ -362,7 +362,7 @@ void CppHighlighter::highlightWord(QStringRef word, int position, int length)
 
     if (word.length() > 2 && word.at(0) == QLatin1Char('Q')) {
         if (word.at(1) == QLatin1Char('_') // Q_
-            || word.at(1) == QLatin1Char('T') && word.at(2) == QLatin1Char('_')) { // QT_
+            || (word.at(1) == QLatin1Char('T') && word.at(2) == QLatin1Char('_'))) { // QT_
             for (int i = 1; i < word.length(); ++i) {
                 const QChar &ch = word.at(i);
                 if (! (ch.isUpper() || ch == QLatin1Char('_')))
-- 
GitLab