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

Extract QVariantMap via QVariant::value<QVariantMap>() remove duplicate keys.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0
    • 5.5.1
    • Core: Other
    • None

    Description

      Expanding from a QVariant via QVariant::value<QVariantMap>() and QVariant::toMap() should give the same or at least equivalent result.
      But the first one seems to remove duplicate Keys.

          QVariantMap map;
          map.insertMulti("Key", "Value1");
          map.insertMulti("Key", "Value2");
      
          QVariant variant = map;
          //fails:
          QCOMPARE(variant.value<QVariantMap>(), variant.toMap());
      

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            richardo Richard Öhlinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes