diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index bacc023cdfd..5a6dc354ba0 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -121,7 +121,7 @@ public: QByteArray &operator=(const QByteArray &) noexcept; QByteArray &operator=(const char *str); inline QByteArray(QByteArray && other) noexcept - { qSwap(d, other.d); } + = default; QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QByteArray) inline void swap(QByteArray &other) noexcept { d.swap(other.d); } diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index b30f4ac981b..a7f0f2451fc 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -462,7 +462,7 @@ public: QString &operator=(const QString &) noexcept; QString &operator=(QLatin1String latin1); inline QString(QString &&other) noexcept - { qSwap(d, other.d); } + = default; QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QString) void swap(QString &other) noexcept { d.swap(other.d); } inline qsizetype size() const { return d.size; }