diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp index ef30b97a6cb..12794bd70a7 100644 --- a/src/corelib/tools/qbitarray.cpp +++ b/src/corelib/tools/qbitarray.cpp @@ -77,6 +77,7 @@ QT_BEGIN_NAMESPACE \sa QByteArray, QList */ +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) /*! \fn QBitArray::QBitArray(QBitArray &&other) @@ -85,6 +86,7 @@ QT_BEGIN_NAMESPACE \since 5.2 */ +#endif /*! \fn QBitArray::QBitArray() @@ -467,6 +469,7 @@ quint32 QBitArray::toUInt32(QSysInfo::Endian endianness, bool *ok) const noexcep \overload */ +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) /*! \fn QBitArray::QBitArray(const QBitArray &other) noexcept Constructs a copy of \a other. @@ -491,6 +494,7 @@ quint32 QBitArray::toUInt32(QSysInfo::Endian endianness, bool *ok) const noexcep Moves \a other to this bit array and returns a reference to this bit array. */ +#endif // Qt 6 /*! \fn void QBitArray::swap(QBitArray &other) \since 4.8 diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h index 06273a26d7c..4a75668a461 100644 --- a/src/corelib/tools/qbitarray.h +++ b/src/corelib/tools/qbitarray.h @@ -63,10 +63,13 @@ class Q_CORE_EXPORT QBitArray public: inline QBitArray() noexcept {} explicit QBitArray(qsizetype size, bool val = false); + // Rule Of Zero applies +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) QBitArray(const QBitArray &other) noexcept : d(other.d) {} inline QBitArray &operator=(const QBitArray &other) noexcept { d = other.d; return *this; } inline QBitArray(QBitArray &&other) noexcept : d(std::move(other.d)) {} QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QBitArray) +#endif // Qt 6 void swap(QBitArray &other) noexcept { d.swap(other.d); }