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

Allow generating messages that reuses the QProtobufMessage dptr

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.8
    • None
    • Protocol Buffers
    • None
    • 21
    • e7da8abb177d0734691529853143e7c8cfd68e33(dev)

      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))
      {}
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes