Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0
Description
QJsonDocument::toVariant() used invalid QVariant as a null value in previous versions. Now it is QVariant of std::nullptr_t, which is unsaveable (QMetaType::save() skips it) and when resulting QVariant is written into a data stream, it throws following an error and aborts:
QMap(("foo", QVariant(std::nullptr_t, (nullptr)))) QVariant::save: unable to save type 'std::nullptr_t' (type id: 51). ASSERT failure in QVariant::save: "Invalid type to save", file /qt/git/qtbase/src/corelib/kernel/qvariant.cpp, line 2144