Obsolete Members for QGrpcOperationContext

The following members of class QGrpcOperationContext are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(deprecated in 6.13) const QHash<QByteArray, QByteArray> &serverMetadata() const &
(deprecated in 6.13) void setServerMetadata(QHash<QByteArray, QByteArray> &&metadata)
(deprecated in 6.13) void setServerMetadata(const QHash<QByteArray, QByteArray> &metadata)

Member Function Documentation

[noexcept, deprecated in 6.13] const QHash<QByteArray, QByteArray> &QGrpcOperationContext::serverMetadata() const &

This function is deprecated since 6.13. We strongly advise against using it in new code.

Use serverInitialMetadata() and serverTrailingMetadata() instead.

Returns the initial metadata received from the server before any response messages.

Initial metadata is sent by the server immediately after the call is established. It may include key-value pairs that provide context for the call.

Note: Keys with the grpc- or qtgrpc- prefix are reserved by gRPC and QtGrpc. Provided entries using them are ignored when the request is built. Concrete channels may impose further restrictions; see QGrpcHttp2Channel#Reserved metadata keys.

Note: This method is used implicitly by QGrpcOperation.

See also setServerMetadata(), serverInitialMetadata(), and QGrpcOperation::serverInitialMetadata().

[deprecated in 6.13] void QGrpcOperationContext::setServerMetadata(QHash<QByteArray, QByteArray> &&metadata)

[deprecated in 6.13] void QGrpcOperationContext::setServerMetadata(const QHash<QByteArray, QByteArray> &metadata)

This function is deprecated since 6.13. We strongly advise against using it in new code.

Use setServerInitialMetadata() instead.

Sets the metadata received from the server at the start of the RPC.

See also setServerInitialMetadata().

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.