QEventLoopLocker: use macro to implement move-ctor

We do have special macros for this case, so use one of them!

Amends c2956f8f76

Found in 6.7 API review.

Pick-to: 6.7
Change-Id: I205966d6f7363abf1a26f59b04555b1a48a4e696
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
bb10
Ivan Solovev 2024-01-17 16:16:55 +01:00
parent edf92b8e33
commit 26b8e99b1c
1 changed files with 1 additions and 2 deletions

View File

@ -65,8 +65,7 @@ public:
Q_NODISCARD_CTOR QEventLoopLocker(QEventLoopLocker &&other) noexcept
: p{std::exchange(other.p, 0)} {}
QEventLoopLocker &operator=(QEventLoopLocker &&other) noexcept
{ auto moved = std::move(other); swap(moved); return *this; }
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QEventLoopLocker)
void swap(QEventLoopLocker &other) noexcept { std::swap(p, other.p); }
friend void swap(QEventLoopLocker &lhs, QEventLoopLocker &rhs) noexcept { lhs.swap(rhs); }