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

JsonDbClient methods create, update, and remove could be overloaded with more C++-friendly signatures

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.0.0
    • (Inactive) JsonDB
    • None

    Description

      JsonDbClient methods create, update, and remove each have one signature with QVariant as the first parameter. They are "dynamically polymorphic": if the QVariant contains a variant map, it is considered to be one Json object, in it's a QMap<QUuid, JsonDbObject>, it's a list of objects (in fact, why does it need to be populated as a map when each object carries its own uuid and the uuids are practically unique by the way of creation?).

      Could there be overloaded versions of these methods that would allow to pass JsonDbObject and a collection of such objects as explicit types checked by the C++ compiler?

      See also QTBUG-23705 for another issue with the API where too much dynamic typing hurts.

      Attachments

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

        Activity

          People

            dzyubenk Denis Dzyubenko (Inactive)
            mzabaluev Mikhail Zabaluev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes