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

Allow generating messages that reuses the QProtobufMessage dptr

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.9
    • None
    • Protocol Buffers
    • None

    Description

      We may add the generator option, as an experimental and with no BiC promise that allows generating the protobuf messages that reuse the QProtobufMessage dptr. This will save some memory in the generated code and can be useful in low-memory applications.
      Prototype:

      // dptr based on QProtobufMessage dptr:
      class $classname$_QtProtobufData : private QProtobufMessagePrivate
      {
          $classname$_QtProtobufData(const QMetaObject *metaObject, const QtProtobufPrivate::QProtobufPropertyOrdering *ordering);
      };
      
      $classname$_QtProtobufData::$classname$_QtProtobufData(const QMetaObject *metaObject, const QtProtobufPrivate::QProtobufPropertyOrdering *ordering) : QProtobufMessagePrivate(metaObject, ordering)
      {}
      
      $classname$::$classname$ : QProtobufMessage(*new $classname$_QtProtobufData(&$classname$::staticMetaObject, &$classname$::staticPropertyOrdering))
      {}
      

      Attachments

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

        Activity

          People

            tatiana.borisova Tatiana Borisova
            semlanik Alexey Edelev
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes