Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.13.2, 5.15.0 Beta1, 6.2.0
-
None
Description
Copying values in QJsonObjects sometimes doesn't work:
QJsonObject obj; obj["value"] = "TEST"; obj["prop2"] = obj["value"]; qDebug() << obj;
Output:
QJsonObject({"prop2":null,"value":"TEST"})
The problem is that QJsonObject keeps its items sorted lexicographically, so inserting "prop2" makes the QJsonValueRef of obj["value"] point to the newly inserted item.
Tested with both 5.13.2 (original binary QJsonDocument implementation) and 5.15.0 beta 4 (QCborContainerPrivate implementation).
Attachments
Issue Links
- resulted from
-
QTBUG-83366 REG: Copy values inside QJsonObject fails
- Closed