Add an instruction for enabling the Well-Known Types in QML
- In some cases it can be useful to extend the Qt Protobuf Well-Known
Types into QML files. For example, google.protobuf.Empty
is often used as an input or an output for rpc methods, like:
rpc emptyMethod(google.protobuf.Empty) returns (google.protobuf.Empty)
Exposing of google.protobuf.Empty into QML allows to use JavaScript
null or {} to represent Empty.
So the following code will be possible to use in QML file:
grpcClient.emptyMethod({}, messageCallback, errorCallback, grpcCallOptions);
The problem detected by the bug: QTBUG-142769
The task to provide QML Well-known types support in future: QTBUG-143631
Pick-to: 6.11
Change-Id: I110bc2786513726dc02bcd0588a86498e77fded5
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>