From b32b61f17eb6f816d854d6177e70df9c9e8fb895 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 30 Apr 2019 17:16:17 +0200 Subject: Remove handling of missing Q_COMPILER_RVALUE_REFS Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira --- src/gui/painting/qbrush.h | 2 -- src/gui/painting/qcolor.h | 2 -- src/gui/painting/qpagelayout.h | 2 -- src/gui/painting/qpagesize.h | 2 -- src/gui/painting/qpainterpath.h | 2 -- src/gui/painting/qpen.h | 2 -- src/gui/painting/qpolygon.h | 8 -------- src/gui/painting/qregion.h | 2 -- 8 files changed, 22 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 27d710eca6..ef8f7a18de 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -79,10 +79,8 @@ public: ~QBrush(); QBrush &operator=(const QBrush &brush); -#ifdef Q_COMPILER_RVALUE_REFS inline QBrush &operator=(QBrush &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QBrush &other) noexcept { qSwap(d, other.d); } diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index 77b2d43c40..e3c267f97d 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -82,11 +82,9 @@ public: #if QT_VERSION < QT_VERSION_CHECK(6,0,0) inline QColor(const QColor &color) noexcept; // ### Qt 6: remove all of these, the trivial ones are fine. -# ifdef Q_COMPILER_RVALUE_REFS QColor(QColor &&other) noexcept : cspec(other.cspec), ct(other.ct) {} QColor &operator=(QColor &&other) noexcept { cspec = other.cspec; ct = other.ct; return *this; } -# endif QColor &operator=(const QColor &) noexcept; #endif // Qt < 6 diff --git a/src/gui/painting/qpagelayout.h b/src/gui/painting/qpagelayout.h index faf0827c1a..7ee0ce7a76 100644 --- a/src/gui/painting/qpagelayout.h +++ b/src/gui/painting/qpagelayout.h @@ -82,9 +82,7 @@ public: const QMarginsF &margins, Unit units = Point, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0)); QPageLayout(const QPageLayout &other); -#ifdef Q_COMPILER_RVALUE_REFS QPageLayout &operator=(QPageLayout &&other) noexcept { swap(other); return *this; } -#endif QPageLayout &operator=(const QPageLayout &other); ~QPageLayout(); diff --git a/src/gui/painting/qpagesize.h b/src/gui/painting/qpagesize.h index a2ea691677..133274760f 100644 --- a/src/gui/painting/qpagesize.h +++ b/src/gui/painting/qpagesize.h @@ -236,9 +236,7 @@ public: const QString &name = QString(), SizeMatchPolicy matchPolicy = FuzzyMatch); QPageSize(const QPageSize &other); -#ifdef Q_COMPILER_RVALUE_REFS QPageSize &operator=(QPageSize &&other) noexcept { swap(other); return *this; } -#endif QPageSize &operator=(const QPageSize &other); ~QPageSize(); diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 2785669260..ed5be667b7 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -92,10 +92,8 @@ public: explicit QPainterPath(const QPointF &startPoint); QPainterPath(const QPainterPath &other); QPainterPath &operator=(const QPainterPath &other); -#ifdef Q_COMPILER_RVALUE_REFS inline QPainterPath &operator=(QPainterPath &&other) noexcept { qSwap(d_ptr, other.d_ptr); return *this; } -#endif ~QPainterPath(); inline void swap(QPainterPath &other) noexcept { d_ptr.swap(other.d_ptr); } diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h index 884ec8cdfa..10b11d1d85 100644 --- a/src/gui/painting/qpen.h +++ b/src/gui/painting/qpen.h @@ -70,12 +70,10 @@ public: ~QPen(); QPen &operator=(const QPen &pen) noexcept; -#ifdef Q_COMPILER_RVALUE_REFS QPen(QPen &&other) noexcept : d(other.d) { other.d = nullptr; } QPen &operator=(QPen &&other) noexcept { qSwap(d, other.d); return *this; } -#endif void swap(QPen &other) noexcept { qSwap(d, other.d); } Qt::PenStyle style() const; diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h index 118861c0f2..93fab55aa1 100644 --- a/src/gui/painting/qpolygon.h +++ b/src/gui/painting/qpolygon.h @@ -60,16 +60,12 @@ public: inline ~QPolygon() {} inline explicit QPolygon(int size); inline /*implicit*/ QPolygon(const QVector &v) : QVector(v) {} -#ifdef Q_COMPILER_RVALUE_REFS /*implicit*/ QPolygon(QVector &&v) noexcept : QVector(std::move(v)) {} -#endif QPolygon(const QRect &r, bool closed=false); QPolygon(int nPoints, const int *points); QPolygon(const QPolygon &other) : QVector(other) {} -#ifdef Q_COMPILER_RVALUE_REFS QPolygon(QPolygon &&other) noexcept : QVector(std::move(other)) {} QPolygon &operator=(QPolygon &&other) noexcept { swap(other); return *this; } -#endif QPolygon &operator=(const QPolygon &other) { QVector::operator=(other); return *this; } void swap(QPolygon &other) noexcept { QVector::swap(other); } // prevent QVector<->QPolygon swaps @@ -145,16 +141,12 @@ public: inline ~QPolygonF() {} inline explicit QPolygonF(int size); inline /*implicit*/ QPolygonF(const QVector &v) : QVector(v) {} -#ifdef Q_COMPILER_RVALUE_REFS /* implicit */ QPolygonF(QVector &&v) noexcept : QVector(std::move(v)) {} -#endif QPolygonF(const QRectF &r); /*implicit*/ QPolygonF(const QPolygon &a); inline QPolygonF(const QPolygonF &a) : QVector(a) {} -#ifdef Q_COMPILER_RVALUE_REFS QPolygonF(QPolygonF &&other) noexcept : QVector(std::move(other)) {} QPolygonF &operator=(QPolygonF &&other) noexcept { swap(other); return *this; } -#endif QPolygonF &operator=(const QPolygonF &other) { QVector::operator=(other); return *this; } inline void swap(QPolygonF &other) { QVector::swap(other); } // prevent QVector<->QPolygonF swaps diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h index 9b6b25d743..54de916198 100644 --- a/src/gui/painting/qregion.h +++ b/src/gui/painting/qregion.h @@ -74,10 +74,8 @@ public: QRegion(const QBitmap &bitmap); ~QRegion(); QRegion &operator=(const QRegion &); -#ifdef Q_COMPILER_RVALUE_REFS inline QRegion &operator=(QRegion &&other) noexcept { qSwap(d, other.d); return *this; } -#endif inline void swap(QRegion &other) noexcept { qSwap(d, other.d); } bool isEmpty() const; bool isNull() const; -- cgit v1.2.3