The QProtobufSerializer class is interface that represents basic functions for serialization/deserialization. More...
| Header: | #include <QProtobufSerializer> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Protobuf)target_link_libraries(mytarget PRIVATE Qt6::Protobuf) |
| Since: | Qt 6.5 |
| Inherits: | QAbstractProtobufSerializer |
| QProtobufSerializer() | |
| virtual | ~QProtobufSerializer() override |
(since 6.7) void |
shouldPreserveUnknownFields(bool preserveUnknownFields) |
| virtual QAbstractProtobufSerializer::Error | lastError() const override |
| virtual QString | lastErrorString() const override |
The QProtobufSerializer class registers serializers/deserializers for classes implementing a protobuf message, inheriting QProtobufMessage. These classes are generated automatically,
based on a .proto file, using the CMake function qt_add_protobuf or by running qtprotobufgen directly.
Constructs a new serializer instance.
[override virtual noexcept] QProtobufSerializer::~QProtobufSerializer()Destroys the serializer instance.
[override virtual] QAbstractProtobufSerializer::Error QProtobufSerializer::lastError() constReimplements: QAbstractProtobufSerializer::lastError() const.
Returns the last deserialization error for the serializer instance.
See also lastErrorString().
[override virtual] QString QProtobufSerializer::lastErrorString() constReimplements: QAbstractProtobufSerializer::lastErrorString() const.
Returns the last deserialization error string for the serializer instance.
See also lastError().
[since 6.7] void QProtobufSerializer::shouldPreserveUnknownFields(bool preserveUnknownFields)Controls whether the unknown fields received from the wire should be stored in the resulting message or if it should be omitted, based on preserveUnknownFields.
This function was introduced in Qt 6.7.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: