diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-08-09 12:18:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-09 13:09:28 +0200 |
commit | f21e01ed220d342990e53817570edd28fb61663d (patch) | |
tree | 92d4c4a5cd43bb55b3451a8d6b1a5a7c2c17b7df /src/qml/parser | |
parent | fc665d512736e1249480a835e26410a92939e535 (diff) |
Fix invalid condition in comparisson.
Thanks to clang (top-of-trunk) pointing out that the unary not operator
only applies to the left-hand side of the equality expression.
Change-Id: I093b447d55995a4122aeac042a506eb56f8b2442
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/parser')
-rw-r--r-- | src/qml/parser/qqmljs.g | 2 | ||||
-rw-r--r-- | src/qml/parser/qqmljsparser.cpp | 1 | ||||
-rw-r--r-- | src/qml/parser/qqmljsparser_p.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljs.g b/src/qml/parser/qqmljs.g index 5d279ef1a2..9476494105 100644 --- a/src/qml/parser/qqmljs.g +++ b/src/qml/parser/qqmljs.g @@ -316,7 +316,7 @@ public: inline DiagnosticMessage diagnosticMessage() const { foreach (const DiagnosticMessage &d, diagnostic_messages) { - if (! d.kind == DiagnosticMessage::Warning) + if (d.kind != DiagnosticMessage::Warning) return d; } diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp index 46b5c041d4..07944c5f23 100644 --- a/src/qml/parser/qqmljsparser.cpp +++ b/src/qml/parser/qqmljsparser.cpp @@ -50,6 +50,7 @@ #include <string.h> + #include "qqmljsparser_p.h" #include <QtCore/qvarlengtharray.h> diff --git a/src/qml/parser/qqmljsparser_p.h b/src/qml/parser/qqmljsparser_p.h index 1b13690547..6edfd844d0 100644 --- a/src/qml/parser/qqmljsparser_p.h +++ b/src/qml/parser/qqmljsparser_p.h @@ -175,7 +175,7 @@ public: inline DiagnosticMessage diagnosticMessage() const { foreach (const DiagnosticMessage &d, diagnostic_messages) { - if (! d.kind == DiagnosticMessage::Warning) + if (d.kind != DiagnosticMessage::Warning) return d; } |