summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qregion.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qregion.h')
-rw-r--r--src/gui/painting/qregion.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 8b991f2fb2..8f52185ed9 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -70,12 +70,11 @@ public:
QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill);
QRegion(const QRegion &region);
QRegion(QRegion &&other) noexcept
- : d(other.d) { other.d = const_cast<QRegionData*>(&shared_empty); }
+ : d(qExchange(other.d, const_cast<QRegionData*>(&shared_empty))) {}
QRegion(const QBitmap &bitmap);
~QRegion();
QRegion &operator=(const QRegion &);
- inline QRegion &operator=(QRegion &&other) noexcept
- { qSwap(d, other.d); return *this; }
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QRegion);
inline void swap(QRegion &other) noexcept { qSwap(d, other.d); }
bool isEmpty() const;
bool isNull() const;