summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.h4
-rw-r--r--src/gui/image/qimage.h5
-rw-r--r--src/gui/image/qpicture.h4
-rw-r--r--src/gui/image/qpixmap.h4
-rw-r--r--src/gui/kernel/qcursor.h4
-rw-r--r--src/gui/kernel/qkeysequence.h4
-rw-r--r--src/gui/kernel/qpalette.h8
-rw-r--r--src/gui/painting/qbrush.h4
-rw-r--r--src/gui/painting/qpainterpath.h4
-rw-r--r--src/gui/painting/qpen.h4
-rw-r--r--src/gui/painting/qregion.h5
-rw-r--r--src/gui/text/qfont.h5
-rw-r--r--src/gui/text/qfontmetrics.h9
13 files changed, 61 insertions, 3 deletions
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index faef07b..fd591e6 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -71,6 +71,10 @@ public:
explicit QIcon(QIconEngineV2 *engine);
~QIcon();
QIcon &operator=(const QIcon &other);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QIcon &operator=(QIcon &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
operator QVariant() const;
QPixmap pixmap(const QSize &size, Mode mode = Normal, State state = Off) const;
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index f37dcf2..4fe7da2 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -140,6 +140,11 @@ public:
~QImage();
QImage &operator=(const QImage &);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QImage &operator=(QImage &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
+
bool isNull() const;
int devType() const;
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index 63ef42e..49b0fd6 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -81,6 +81,10 @@ public:
void setBoundingRect(const QRect &r);
QPicture& operator=(const QPicture &p);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QPicture &operator=(QPicture &&other)
+ { qSwap(d_ptr, other.d_ptr); return *this; }
+#endif
void detach();
bool isDetached() const;
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 64ca8a3..e9f9365 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -83,6 +83,10 @@ public:
~QPixmap();
QPixmap &operator=(const QPixmap &);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QPixmap &operator=(QPixmap &&other)
+ { qSwap(data, other.data); return *this; }
+#endif
operator QVariant() const;
bool isNull() const; // ### Qt 5: make inline
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index 2490d20..ed6b254 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -96,6 +96,10 @@ public:
QCursor(const QCursor &cursor);
~QCursor();
QCursor &operator=(const QCursor &cursor);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QCursor &operator=(QCursor &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
operator QVariant() const;
Qt::CursorShape shape() const;
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 5a973e3..b47873d 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -179,6 +179,10 @@ public:
operator int() const;
int operator[](uint i) const;
QKeySequence &operator=(const QKeySequence &other);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QKeySequence &operator=(QKeySequence &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
bool operator==(const QKeySequence &other) const;
inline bool operator!= (const QKeySequence &other) const
{ return !(*this == other); }
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index f797f86..7b7b41d 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -78,6 +78,14 @@ public:
QPalette(const QPalette &palette);
~QPalette();
QPalette &operator=(const QPalette &palette);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QPalette &operator=(QPalette &&other)
+ {
+ resolve_mask = other.resolve_mask;
+ current_group = other.current_group;
+ qSwap(d, other.d); return *this;
+ }
+#endif
operator QVariant() const;
// Do not change the order, the serialization format depends on it
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
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index f941d1e..d6f4dc5 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -226,7 +226,10 @@ public:
bool operator<(const QFont &) const;
operator QVariant() const;
bool isCopyOf(const QFont &) const;
-
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QFont &operator=(QFont &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
#ifdef Q_WS_WIN
HFONT handle() const;
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 9911ad2..5a79429 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -71,6 +71,10 @@ public:
~QFontMetrics();
QFontMetrics &operator=(const QFontMetrics &);
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QFontMetrics &operator=(QFontMetrics &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
int ascent() const;
int descent() const;
@@ -149,7 +153,10 @@ public:
QFontMetricsF &operator=(const QFontMetricsF &);
QFontMetricsF &operator=(const QFontMetrics &);
-
+#ifdef Q_COMPILER_RVALUE_REFS
+ inline QFontMetricsF &operator=(QFontMetricsF &&other)
+ { qSwap(d, other.d); return *this; }
+#endif
qreal ascent() const;
qreal descent() const;
qreal height() const;