summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpen.h')
-rw-r--r--src/gui/painting/qpen.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h
index 38282bda39..db280c765b 100644
--- a/src/gui/painting/qpen.h
+++ b/src/gui/painting/qpen.h
@@ -71,9 +71,8 @@ public:
QPen &operator=(const QPen &pen) noexcept;
QPen(QPen &&other) noexcept
- : d(other.d) { other.d = nullptr; }
- QPen &operator=(QPen &&other) noexcept
- { qSwap(d, other.d); return *this; }
+ : d(qExchange(other.d, nullptr)) {}
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QPen)
void swap(QPen &other) noexcept { qSwap(d, other.d); }
Qt::PenStyle style() const;