diff --git a/src/grpc/CMakeLists.txt b/src/grpc/CMakeLists.txt index beffeefc..bc0420c0 100644 --- a/src/grpc/CMakeLists.txt +++ b/src/grpc/CMakeLists.txt @@ -4,7 +4,7 @@ qt_internal_add_module(Grpc SOURCES qgrpcoperation.h qgrpcoperation_p.h qgrpcoperation.cpp - qgrpcoperationcontext.h qgrpcoperationcontext.cpp + qgrpcoperationcontext.h qgrpcoperationcontext_p.h qgrpcoperationcontext.cpp qgrpccallreply.h qgrpccallreply.cpp qgrpcstream.h qgrpcstream.cpp qgrpcstatus.h qgrpcstatus.cpp diff --git a/src/grpc/qgrpcoperationcontext.cpp b/src/grpc/qgrpcoperationcontext.cpp index 41b2214e..b81a307b 100644 --- a/src/grpc/qgrpcoperationcontext.cpp +++ b/src/grpc/qgrpcoperationcontext.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include -#include +#include #include #include @@ -142,31 +142,6 @@ QT_BEGIN_NAMESPACE \sa QGrpcBidiStream::writesDone */ -class QGrpcOperationContextPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QGrpcOperationContext) -public: - QGrpcOperationContextPrivate(QLatin1StringView method_, QLatin1StringView service_, - QByteArrayView argument_, QGrpcCallOptions options_, - std::shared_ptr &&serializer_) - : method(method_), service(service_), argument(argument_.toByteArray()), - options(std::move(options_)), serializer(std::move(serializer_)) - { - } - - QLatin1StringView method; - QLatin1StringView service; - QByteArray argument; - QGrpcCallOptions options; - std::shared_ptr serializer; - QMetaType responseMetaType; - QMultiHash serverInitialMetadata; -#if QT_DEPRECATED_SINCE(6, 13) - QHash deprServerInitialMetadata; -#endif - QMultiHash serverTrailingMetadata; -}; - /*! \internal diff --git a/src/grpc/qgrpcoperationcontext_p.h b/src/grpc/qgrpcoperationcontext_p.h new file mode 100644 index 00000000..89874c75 --- /dev/null +++ b/src/grpc/qgrpcoperationcontext_p.h @@ -0,0 +1,56 @@ +// Copyright (C) 2025 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QGRPCOPERATIONCONTEXT_P_H +#define QGRPCOPERATIONCONTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QGrpcOperationContextPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QGrpcOperationContext) +public: + QGrpcOperationContextPrivate(QLatin1StringView method_, QLatin1StringView service_, + QByteArrayView argument_, QGrpcCallOptions options_, + std::shared_ptr &&serializer_) + : method(method_), service(service_), argument(argument_.toByteArray()), + options(std::move(options_)), serializer(std::move(serializer_)) + { + } + + QLatin1StringView method; + QLatin1StringView service; + QByteArray argument; + QGrpcCallOptions options; + std::shared_ptr serializer; + QMetaType responseMetaType; + QMultiHash serverInitialMetadata; +#if QT_DEPRECATED_SINCE(6, 13) + QHash deprServerInitialMetadata; +#endif + QMultiHash serverTrailingMetadata; +}; + +QT_END_NAMESPACE + +#endif // QGRPCOPERATIONCONTEXT_P_H