mirror of https://github.com/qt/qtgrpc.git
Mark deleted rvalue-this overloads as const
These functions are not callable. Declaring them const allows them to match more calls (specifically, const rvalues, which before would have given "no matching overload" instead of "deleted" errors). Pick-to: 6.10 Change-Id: I3d074d561456cf98fccacabea68204c92b7a4b38 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
8c8c100d51
commit
e7e50fe1e1
|
|
@ -34,7 +34,7 @@ public:
|
|||
[[nodiscard]] virtual std::shared_ptr<QAbstractProtobufSerializer> serializer() const = 0;
|
||||
|
||||
[[nodiscard]] const QGrpcChannelOptions &channelOptions() const & noexcept;
|
||||
void channelOptions() && = delete;
|
||||
void channelOptions() const && = delete;
|
||||
|
||||
void setChannelOptions(const QGrpcChannelOptions &options);
|
||||
void setChannelOptions(QGrpcChannelOptions &&options);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ protected:
|
|||
{
|
||||
return const_cast<QGrpcOperationContext &>(std::as_const(*this).context());
|
||||
}
|
||||
void context() && = delete;
|
||||
void context() const && = delete;
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(QGrpcOperation)
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ public:
|
|||
[[nodiscard]] QLatin1StringView service() const noexcept;
|
||||
[[nodiscard]] QByteArrayView argument() const noexcept;
|
||||
|
||||
void callOptions() && = delete;
|
||||
void callOptions() const && = delete;
|
||||
[[nodiscard]] const QGrpcCallOptions &callOptions() const & noexcept;
|
||||
|
||||
void serverMetadata() && = delete;
|
||||
void serverMetadata() const && = delete;
|
||||
[[nodiscard]] const QHash<QByteArray, QByteArray> &serverMetadata() const & noexcept;
|
||||
void setServerMetadata(const QHash<QByteArray, QByteArray> &metadata);
|
||||
void setServerMetadata(QHash<QByteArray, QByteArray> &&metadata);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public:
|
|||
~QQmlGrpcCallOptions() override;
|
||||
|
||||
const QGrpcCallOptions &options() const & noexcept;
|
||||
void options() && = delete;
|
||||
void options() const && = delete;
|
||||
|
||||
qint64 deadlineTimeout() const;
|
||||
void setDeadlineTimeout(qint64 value);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
~QQmlGrpcChannelOptions() override;
|
||||
|
||||
const QGrpcChannelOptions &options() const & noexcept;
|
||||
void options() && = delete;
|
||||
void options() const && = delete;
|
||||
|
||||
qint64 deadlineTimeout() const;
|
||||
void setDeadlineTimeout(qint64 value);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
~QQmlGrpcMetadata() override;
|
||||
|
||||
const QMultiHash<QByteArray, QByteArray> &metadata() const & noexcept { return m_metadata; }
|
||||
void metadata() && = delete;
|
||||
void metadata() const && = delete;
|
||||
|
||||
const QVariantMap &data() const { return m_variantdata; }
|
||||
void setData(const QVariantMap &data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue