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

QJsonDocument::operator== crashes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 5.15.2
    • None

    Description

      If you want to compare a default constructed QJsonDocument to one that contains a QJsonObject, it will crash.

          QJsonDocument doc1;
          QJsonDocument doc2;
          const bool iseq1 = doc1 == doc2; // no crash here
      
          QJsonObject obj;
          doc1.setObject(obj);
          const bool iseq2 = doc1 == doc2; // here it crashes
      

      If we are comparing them the other way, it is working fine.
      I suspect that in operator==, only this is checked for null, but the right-side argument is not.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            gabor.szabo Gábor Szabó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes