summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpolygon.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpolygon.h')
-rw-r--r--src/gui/painting/qpolygon.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/painting/qpolygon.h b/src/gui/painting/qpolygon.h
index 3890715f32..1e503c03b7 100644
--- a/src/gui/painting/qpolygon.h
+++ b/src/gui/painting/qpolygon.h
@@ -52,11 +52,15 @@ public:
inline QPolygon() {}
inline ~QPolygon() {}
inline explicit QPolygon(int size);
- inline QPolygon(const QPolygon &a) : QVector<QPoint>(a) {}
inline /*implicit*/ QPolygon(const QVector<QPoint> &v) : QVector<QPoint>(v) {}
+#ifdef Q_COMPILER_RVALUE_REFS
+ /*implicit*/ QPolygon(QVector<QPoint> &&v) Q_DECL_NOTHROW : QVector<QPoint>(std::move(v)) {}
+#endif
QPolygon(const QRect &r, bool closed=false);
QPolygon(int nPoints, const int *points);
+ QPolygon(const QPolygon &other) : QVector<QPoint>(other) {}
#ifdef Q_COMPILER_RVALUE_REFS
+ QPolygon(QPolygon &&other) Q_DECL_NOTHROW : QVector<QPoint>(std::move(other)) {}
QPolygon &operator=(QPolygon &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
QPolygon &operator=(const QPolygon &other) { QVector<QPoint>::operator=(other); return *this; }
@@ -130,11 +134,15 @@ public:
inline QPolygonF() {}
inline ~QPolygonF() {}
inline explicit QPolygonF(int size);
- inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
inline /*implicit*/ QPolygonF(const QVector<QPointF> &v) : QVector<QPointF>(v) {}
+#ifdef Q_COMPILER_RVALUE_REFS
+ /* implicit */ QPolygonF(QVector<QPointF> &&v) Q_DECL_NOTHROW : QVector<QPointF>(std::move(v)) {}
+#endif
QPolygonF(const QRectF &r);
/*implicit*/ QPolygonF(const QPolygon &a);
+ inline QPolygonF(const QPolygonF &a) : QVector<QPointF>(a) {}
#ifdef Q_COMPILER_RVALUE_REFS
+ QPolygonF(QPolygonF &&other) Q_DECL_NOTHROW : QVector<QPointF>(std::move(other)) {}
QPolygonF &operator=(QPolygonF &&other) Q_DECL_NOTHROW { swap(other); return *this; }
#endif
QPolygonF &operator=(const QPolygonF &other) { QVector<QPointF>::operator=(other); return *this; }