diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-01-23 10:22:10 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-23 15:12:21 +0100 |
commit | 898c8c76d23ba053d45296a5da4863a7e9e42bdd (patch) | |
tree | e0585c7ed2bdbcb7b32907d4d2407e63c354cbec /src/qml/jsapi | |
parent | f628067b9efe86766764ef47b4e50fee942ba1d8 (diff) |
Fix warning about comparing double to boolean in js_equal().
jsapi\qjsvalue.cpp(749) : warning C4805: '==' : unsafe mix of type 'double' and type 'bool' in operation
Change-Id: I06d0950ce932ea635c422d3fb42ca80e6725dda1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r-- | src/qml/jsapi/qjsvalue.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index 6a0cf0cf6d..4cc3796541 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -746,7 +746,7 @@ static bool js_equal(const QString &string, QV4::ValueRef value) if (value->isNumber()) return __qmljs_string_to_number(string) == value->asDouble(); if (value->isBoolean()) - return __qmljs_string_to_number(string) == value->booleanValue(); + return __qmljs_string_to_number(string) == double(value->booleanValue()); if (value->isObject()) { Scope scope(value->objectValue()->engine()); ScopedValue p(scope, __qmljs_to_primitive(value, PREFERREDTYPE_HINT)); |