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

QJsonObject to QAssociativeIterable conversion fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.0, 5.13.0
    • None

    Description

      The following code crashes in it.size()

      QJsonObject obj {
          { QStringLiteral("foo"), QStringLiteral("bar") }
      };
          
      QVariant v(obj);
          
      if (v.canConvert<QVariantHash>()) {
          auto it = v.value<QAssociativeIterable>();
          it.size();
          qDebug() << "Didn't crash";
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              nierob Nierob
              nicolasfella Nicolas Fella
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes