diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index 547576ea6023b5a28abd7cd0d4c79c5e72cca28c..d7c04eb5f11fc0d49e48d660b2edf7b7a529a9d9 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -139,9 +139,9 @@ public:
                 // #rgba
                 for (int i = 1; i < 9; ++i) {
                     const QChar c = colorString.at(i);
-                    if (c >= QLatin1Char('0') && c <= QLatin1Char('9')
-                        || c >= QLatin1Char('a') && c <= QLatin1Char('f')
-                        || c >= QLatin1Char('A') && c <= QLatin1Char('F'))
+                    if ((c >= QLatin1Char('0') && c <= QLatin1Char('9'))
+                        || (c >= QLatin1Char('a') && c <= QLatin1Char('f'))
+                        || (c >= QLatin1Char('A') && c <= QLatin1Char('F')))
                         continue;
                     ok = false;
                     break;