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

        For Gerrit Dashboard: QTBUG-59391
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              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