QCborContainerPrivate: honor the RO5

The class defines a destructor, but it's also meant to be copy/move
constructible (being a shared data for QCbor* classes). On the same
note, the class is not meant to be assignable, as doing so would corrupt
the refcounting, so delete those operations.

Change-Id: I7781773da86b26544f9389337bfc059d9483fef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2025-01-08 14:47:37 +01:00
parent 09e40152f8
commit 239474710d

View File

@ -101,6 +101,12 @@ class QCborContainerPrivate : public QSharedData
~QCborContainerPrivate(); ~QCborContainerPrivate();
public: public:
QCborContainerPrivate() = default;
QCborContainerPrivate(const QCborContainerPrivate &) = default;
QCborContainerPrivate(QCborContainerPrivate &&) = default;
QCborContainerPrivate &operator=(const QCborContainerPrivate &) = delete;
QCborContainerPrivate &operator=(QCborContainerPrivate &&) = delete;
enum ContainerDisposition { CopyContainer, MoveContainer }; enum ContainerDisposition { CopyContainer, MoveContainer };
QByteArray::size_type usedData = 0; QByteArray::size_type usedData = 0;