Properly detach when the modified object is a sub object
authorLars Knoll <lars.knoll@nokia.com>
Thu, 29 Mar 2012 10:25:09 +0000 (12:25 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 29 Mar 2012 14:08:40 +0000 (16:08 +0200)
commit698b33fccebbd1cb4094fdf8dc681108824530f5
tree888f82aa06204095cb8a6023e79447a023a84caf
parent19109a7697c786253563c97d102dc69f7dce002d
Properly detach when the modified object is a sub object

The clone() method didn't detach if we had enough memory
allocated, but didn't consider that the object being
modified is not the root object of the binary blob.

Change-Id: I9a479ae1c873b7fe9cff7e13c539e7a41961bf68
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
Reviewed-by: abcd <amos.choy@nokia.com>
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
src/corelib/json/qjson_p.h
tests/auto/corelib/json/tst_qtjson.cpp