diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-06 08:34:03 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-06 09:04:55 +0200 |
commit | 57057f76add416d0faf2e09a90c126baafb6198e (patch) | |
tree | 07d54f8e5daeb3ed1161723542e94c324d745166 /src/corelib/json | |
parent | dc0ae02ebc8e221f952829230c0301a718a6f10b (diff) | |
parent | fd70978693bd92761e9989bc1c76bf83c1e8c987 (diff) | |
download | qtbase-57057f76add416d0faf2e09a90c126baafb6198e.tar.gz |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
.qmake.conf
config.tests/unix/nis/nis.cpp
mkspecs/unsupported/freebsd-g++/qplatformdefs.h
src/corelib/tools/qdatetime.cpp
src/corelib/tools/qsimd.cpp
src/corelib/tools/qsimd_p.h
src/network/access/access.pri
src/network/access/qnetworkreplynsurlconnectionimpl.mm
src/network/access/qnetworkreplynsurlconnectionimpl_p.h
src/plugins/platforms/cocoa/qnsview.mm
src/plugins/printsupport/windows/qwindowsprintdevice.cpp
tests/auto/corelib/kernel/qobject/tst_qobject.cpp
tests/auto/network/access/qnetworkreply/BLACKLIST
tests/auto/widgets/widgets/qopenglwidget/BLACKLIST
Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
Diffstat (limited to 'src/corelib/json')
-rw-r--r-- | src/corelib/json/qjson_p.h | 2 | ||||
-rw-r--r-- | src/corelib/json/qjsonvalue.cpp | 24 |
2 files changed, 6 insertions, 20 deletions
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h index 5e34845fe3..f92a6821d7 100644 --- a/src/corelib/json/qjson_p.h +++ b/src/corelib/json/qjson_p.h @@ -410,7 +410,7 @@ public: // pack with itself, we'll discard the high part anyway chunk = _mm_packus_epi16(chunk, chunk); // unaligned 64-bit store - qUnalignedStore(l + i, _mm_cvtsi128_si64(chunk)); + qToUnaligned(_mm_cvtsi128_si64(chunk), l + i); i += 8; } # endif diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp index b21f59ae35..718dfa43b3 100644 --- a/src/corelib/json/qjsonvalue.cpp +++ b/src/corelib/json/qjsonvalue.cpp @@ -275,25 +275,11 @@ QJsonValue::QJsonValue(const QJsonValue &other) */ QJsonValue &QJsonValue::operator =(const QJsonValue &other) { - if (t == String && stringData && !stringData->ref.deref()) - free(stringData); - - t = other.t; - dbl = other.dbl; - - if (d != other.d) { - - if (d && !d->ref.deref()) - delete d; - d = other.d; - if (d) - d->ref.ref(); - - } - - if (t == String && stringData) - stringData->ref.ref(); - + QJsonValue copy(other); + // swap(copy); + qSwap(dbl, copy.dbl); + qSwap(d, copy.d); + qSwap(t, copy.t); return *this; } |