summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2024-04-02 16:56:24 +0200
committerAlexey Edelev <alexey.edelev@qt.io>2024-04-04 14:55:59 +0200
commita624621ad40f52794ded3efc94d6a45049e92726 (patch)
tree4ca730226606402fda68f5c02d706ee38272ba95
parent814fb1a918d09cb21061ac74ab18156c10fdc517 (diff)
Do not export the whole QProtobufOneof but only the required members
Task-number: QTBUG-123626 Change-Id: Id343de7cb29351d691aefd888127ab4ff1ae5351 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r--src/protobuf/qprotobufoneof.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/protobuf/qprotobufoneof.h b/src/protobuf/qprotobufoneof.h
index c3e4d20..3300b53 100644
--- a/src/protobuf/qprotobufoneof.h
+++ b/src/protobuf/qprotobufoneof.h
@@ -23,7 +23,7 @@ class QAbstractProtobufSerializer;
namespace QtProtobufPrivate {
class QProtobufOneofPrivate;
-class Q_PROTOBUF_EXPORT QProtobufOneof final
+class QProtobufOneof final
{
template<typename T>
using IsProtobufMessageType =
@@ -46,10 +46,10 @@ class Q_PROTOBUF_EXPORT QProtobufOneof final
int>;
public:
- QProtobufOneof();
- ~QProtobufOneof();
- QProtobufOneof(const QProtobufOneof &other);
- QProtobufOneof &operator=(const QProtobufOneof &other);
+ Q_PROTOBUF_EXPORT QProtobufOneof();
+ Q_PROTOBUF_EXPORT ~QProtobufOneof();
+ Q_PROTOBUF_EXPORT QProtobufOneof(const QProtobufOneof &other);
+ Q_PROTOBUF_EXPORT QProtobufOneof &operator=(const QProtobufOneof &other);
QProtobufOneof(QProtobufOneof &&other) noexcept : d_ptr(std::exchange(other.d_ptr, {})) { }
QProtobufOneof &operator=(QProtobufOneof &&other) noexcept
{
@@ -93,8 +93,8 @@ public:
&& *(value<T>()) == otherValue;
}
- int fieldNumber() const;
- bool holdsField(int fieldNumber) const;
+ Q_PROTOBUF_EXPORT int fieldNumber() const;
+ Q_PROTOBUF_EXPORT bool holdsField(int fieldNumber) const;
private:
friend bool operator==(const QProtobufOneof &lhs, const QProtobufOneof &rhs)
@@ -105,12 +105,12 @@ private:
{
return !lhs.isEqual(rhs);
}
- bool isEqual(const QProtobufOneof &other) const;
+ Q_PROTOBUF_EXPORT bool isEqual(const QProtobufOneof &other) const;
friend class QT_PREPEND_NAMESPACE(QProtobufMessage);
- void setValue(const QVariant &value, int fieldNumber);
- QVariant &rawValue() const;
+ Q_PROTOBUF_EXPORT void setValue(const QVariant &value, int fieldNumber);
+ Q_PROTOBUF_EXPORT QVariant &rawValue() const;
QProtobufOneofPrivate *d_ptr;
Q_DECLARE_PRIVATE(QProtobufOneof)