qtprotobufgen: Omit proto2 group fields instead of emitting broken code


Groups carry their own start-group/end-group wire encoding, which Qt
Protobuf does not implement and documents as unsupported. The generator
had no case for TYPE_GROUP at all: produceTypeMap() handles TYPE_MESSAGE
and TYPE_ENUM and lets everything else fall through to the scalar path,
where the type lookup returns an empty string. A group field therefore
produced

    Q_PROPERTY(QtProtobuf:: data READ data_p WRITE setData_p FINAL)

which moc rejects, so any .proto containing a group failed to build with
a parse error pointing at generated code.

Skip group fields and report each one. The field metadata is derived in
several places that count fields independently of
iterateMessageFields(), so they all have to skip alike or the property
indices and offsets stop agreeing with the generated properties.

Field numbers of the surrounding fields are unaffected: only the group
entry disappears from the ordering.

Document what happens to groups in the qtprotobufgen overview, and stop
calling groups deprecated in proto3 in the WireTypes documentation: they
are deprecated in proto2 and do not exist in proto3.

[ChangeLog][QtProtobuf][qtprotobufgen] A .proto containing proto2 groups
now generates compilable code. Group fields are skipped with a warning,
because Qt Protobuf does not implement the group wire format. Such a
field previously produced a property with an empty type name, which moc
rejected.

Fixes: QTBUG-150055
Pick-to: 6.12 6.11 6.8
Change-Id: I38c5204916da8724c98ff1de6324d5c4da1927c6
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit9e0ac5fb728eb88e7e588528febedd5f5b6cff7c
parent841e2123f3a83bb75f374e391f103990aff88bb2
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeWed, 14 Oct 2026 09:24:17 +0000