[Interest] QJsonValue toArray and toObject possible behavior change

Thiago Macieira thiago.macieira at intel.com
Wed Jun 8 19:18:54 CEST 2022

On Wednesday, 8 June 2022 03:31:07 PDT Tobias Weihs wrote:
> In 5.8 this printed an empty object and an empty array (like I would
> have expected), but in 5.15.2 this prints the default values instead.
> Documentation also says if the type of the QJsonValue is not
> Object/Array then the defaultValue is returned but the type is actually
> correct in both versions.
> Is this an intended change or am I doing something wrong? I had a quick
> look into the bug tracker and couldn't find anything related. I'm also
> not able to test this with any newer version.

It's a bug.
Fixed with: https://codereview.qt-project.org/c/qt/qtbase/+/415022

Thiago Macieira - thiago.macieira (AT) intel.com
  Cloud Software Architect - Intel DCAI Cloud Engineering

More information about the Interest mailing list