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

QVariantMap <--> QVariantHash converters

    XMLWordPrintable

Details

    Description

      QVariants internal converters do not allow to convert a QVariantMap to a QVariantHash and vice versa. That alone would not be a problem, but QMetaType::registerConverter does not allow to register a converter for built in types (for whatever reason), making it impossible to create those.

      One example of a usecase would be: I store a QVariantHash as a json object. When I try to read it back later, it fails, because QJsonObjects are converted to QVariantMaps, and they fail to convert to a hash.

      It would be nice to add those, or make it possible to register converters for built in types.

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            SkyCoder Felix Barz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes