diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-18 09:01:51 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-11-18 09:01:51 +0100 |
commit | c7934f2489e2eb9a539206bab35f335b1943c5bd (patch) | |
tree | a27d0ed6c001fe9432e2a0f28fb935acf9e4c65f /src/corelib/json | |
parent | f40593b11199fbef886bfcb6b210a214d8c3adf3 (diff) | |
parent | 08f9a1bd6ab9b1777ee5ba163d75e5c848c39eb4 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/corelib/io/qprocess.cpp
src/corelib/io/qprocess_unix.cpp
src/network/kernel/qnetworkinterface_winrt.cpp
tools/configure/configureapp.cpp
Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
Diffstat (limited to 'src/corelib/json')
-rw-r--r-- | src/corelib/json/qjson_p.h | 4 | ||||
-rw-r--r-- | src/corelib/json/qjsonvalue.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h index 5fc021c841..35a16b0ef6 100644 --- a/src/corelib/json/qjson_p.h +++ b/src/corelib/json/qjson_p.h @@ -280,7 +280,7 @@ static inline int compressedNumber(double d) if (non_int) return INT_MAX; - bool neg = (val >> 63); + bool neg = (val >> 63) != 0; val &= fraction_mask; val |= ((quint64)1 << 52); int res = (int)(val >> (52 - exp)); @@ -543,7 +543,7 @@ public: offset tableOffset; // content follows here - inline bool isObject() const { return is_object; } + inline bool isObject() const { return !!is_object; } inline bool isArray() const { return !isObject(); } inline offset *table() const { return (offset *) (((char *) this) + tableOffset); } diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp index 4c7a44b4a0..328e07d18e 100644 --- a/src/corelib/json/qjsonvalue.cpp +++ b/src/corelib/json/qjsonvalue.cpp @@ -173,7 +173,7 @@ QJsonValue::QJsonValue(int n) QJsonValue::QJsonValue(qint64 n) : d(0), t(Double) { - this->dbl = n; + this->dbl = double(n); } /*! @@ -515,7 +515,7 @@ bool QJsonValue::toBool(bool defaultValue) const int QJsonValue::toInt(int defaultValue) const { if (t == Double && int(dbl) == dbl) - return dbl; + return int(dbl); return defaultValue; } |