diff options
Diffstat (limited to 'src/gui/kernel/qcursor.h')
-rw-r--r-- | src/gui/kernel/qcursor.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index 1ae60d9311..c1d45cc41b 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -87,9 +87,8 @@ public: QCursor(const QCursor &cursor); ~QCursor(); QCursor &operator=(const QCursor &cursor); - QCursor(QCursor &&other) noexcept : d(other.d) { other.d = nullptr; } - inline QCursor &operator=(QCursor &&other) noexcept - { swap(other); return *this; } + QCursor(QCursor &&other) noexcept : d(qExchange(other.d, nullptr)) {} + QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QCursor) void swap(QCursor &other) noexcept { qSwap(d, other.d); } |