Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59391

[REG: 5.7->5.8]: QJsonDocument turns null values into nullptr which does not work with QDataStream

    XMLWordPrintable

Details

    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
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes