diff options
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qbrush.h | 4 | ||||
-rw-r--r-- | src/gui/painting/qpainterpath.h | 4 | ||||
-rw-r--r-- | src/gui/painting/qpen.h | 4 | ||||
-rw-r--r-- | src/gui/painting/qregion.h | 5 |
4 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index b657301..efc720b 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -92,6 +92,10 @@ public: ~QBrush(); QBrush &operator=(const QBrush &brush); +#ifdef Q_COMPILER_RVALUE_REFS + inline QBrush &operator=(QBrush &&other) + { qSwap(d, other.d); return *this; } +#endif operator QVariant() const; inline Qt::BrushStyle style() const; diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h index 15d83b8..9a7b60a 100644 --- a/src/gui/painting/qpainterpath.h +++ b/src/gui/painting/qpainterpath.h @@ -95,6 +95,10 @@ 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) + { qSwap(d_ptr, other.d_ptr); return *this; } +#endif ~QPainterPath(); void closeSubpath(); diff --git a/src/gui/painting/qpen.h b/src/gui/painting/qpen.h index aff7071..4006112 100644 --- a/src/gui/painting/qpen.h +++ b/src/gui/painting/qpen.h @@ -74,6 +74,10 @@ public: ~QPen(); QPen &operator=(const QPen &pen); +#ifdef Q_COMPILER_RVALUE_REFS + inline QPen &operator=(QPen &&other) + { qSwap(d, other.d); return *this; } +#endif Qt::PenStyle style() const; void setStyle(Qt::PenStyle); diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h index bc4da28..2e42844 100644 --- a/src/gui/painting/qregion.h +++ b/src/gui/painting/qregion.h @@ -81,7 +81,10 @@ public: QRegion(const QBitmap &bitmap); ~QRegion(); QRegion &operator=(const QRegion &); - +#ifdef Q_COMPILER_RVALUE_REFS + inline QRegion &operator=(QRegion &&other) + { qSwap(d, other.d); return *this; } +#endif #ifdef QT3_SUPPORT inline QT3_SUPPORT bool isNull() const { return isEmpty(); } #endif |