diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2020-06-11 11:33:24 -0700 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-24 22:43:57 +0200 |
commit | cb1c66bd204c12d848f47de6411d31edbafaf008 (patch) | |
tree | bc0c10d5f5e1970fcf181a05f839d6c07136998c /src/corelib/kernel/qmetaobject.cpp | |
parent | bdc2493096d3eab932da0cdf50b4c7238bf333b3 (diff) |
Fix conversion of QVariant() in QJsonArrays and Objects (through CBOR)
When I wrote the QCborValue to QJsonValue conversion, I used
QJsonValue::Undefined because it allowed to keep some level of
compatibility in CBOR, despite the function documentation saying that
CBOR undefineds became JSON nulls. Which they did.
But when we converted QJson{Array,Object} to be backed by CBOR classes,
that Undefined meant the insertion into the array/object actually
deleted the entry.
[ChangeLog][JSON] Fixed a regression from 5.14 that caused values of
default-constructed QVariants in QVariantLists, QVariantMaps and
QVariantHashes to disappear when converting to JSON via
fromVariant{,List,Map,Hash}.
Fixes: QTBUG-84610
Pick-to: 5.15
Change-Id: Ic0987177fe463f352db9bd84993f116e2bdacc75
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
0 files changed, 0 insertions, 0 deletions