diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-03-08 10:41:55 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-08 16:06:48 +0100 |
commit | 763790bb5c4423952daf97ed0194db8db1ea1a3b (patch) | |
tree | 7ecd9d92fa9710938232080344d386da0774d757 /src/corelib/json/qjsonarray.cpp | |
parent | cf6dd5baca26c202de26c8366010a8958ea08d20 (diff) |
Fix a bug in the assignment operators for QJsonObject and Array
When objects or arrays where being used read only, several objects
can share the same d pointer, but will have different pointers into
the binary data. Correctly change the pointer into the binary
data even if the d-pointer is the same.
Change-Id: Ife0ea5ac5daf46586f855dccdf35b51ec696a623
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'src/corelib/json/qjsonarray.cpp')
-rw-r--r-- | src/corelib/json/qjsonarray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/json/qjsonarray.cpp b/src/corelib/json/qjsonarray.cpp index 433a68105d..6bae2001a1 100644 --- a/src/corelib/json/qjsonarray.cpp +++ b/src/corelib/json/qjsonarray.cpp @@ -122,10 +122,10 @@ QJsonArray &QJsonArray::operator =(const QJsonArray &other) if (d && !d->ref.deref()) delete d; d = other.d; - a = other.a; if (d) d->ref.ref(); } + a = other.a; return *this; } |