summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-04-30 17:16:17 +0200
committerAapo Keskimolo <aapo.keskimolo@qt.io>2019-05-01 20:24:45 +0000
commitb32b61f17eb6f816d854d6177e70df9c9e8fb895 (patch)
tree8e0c960d86381ad09ad4a3219dd02e13c0ec1519 /src/gui
parent2ded0043ca5115ddec41c15b2b98481f45bf0eba (diff)
Remove handling of missing Q_COMPILER_RVALUE_REFS
Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.h4
-rw-r--r--src/gui/image/qimage.h4
-rw-r--r--src/gui/image/qpicture.h2
-rw-r--r--src/gui/image/qpixmap.h4
-rw-r--r--src/gui/image/qpixmapcache.h2
-rw-r--r--src/gui/kernel/qcursor.h2
-rw-r--r--src/gui/kernel/qevent.h2
-rw-r--r--src/gui/kernel/qkeysequence.h2
-rw-r--r--src/gui/kernel/qpalette.h2
-rw-r--r--src/gui/opengl/qopengldebug.h2
-rw-r--r--src/gui/opengl/qopenglpixeltransferoptions.h2
-rw-r--r--src/gui/painting/qbrush.h2
-rw-r--r--src/gui/painting/qcolor.h2
-rw-r--r--src/gui/painting/qpagelayout.h2
-rw-r--r--src/gui/painting/qpagesize.h2
-rw-r--r--src/gui/painting/qpainterpath.h2
-rw-r--r--src/gui/painting/qpen.h2
-rw-r--r--src/gui/painting/qpolygon.h8
-rw-r--r--src/gui/painting/qregion.h2
-rw-r--r--src/gui/text/qfont.h2
-rw-r--r--src/gui/text/qfontmetrics.h4
-rw-r--r--src/gui/text/qglyphrun.h2
-rw-r--r--src/gui/text/qrawfont.h2
-rw-r--r--src/gui/text/qstatictext.h2
-rw-r--r--src/gui/text/qtextcursor.h2
25 files changed, 0 insertions, 64 deletions
diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h
index 0f834fc2cb..735a3e134d 100644
--- a/src/gui/image/qicon.h
+++ b/src/gui/image/qicon.h
@@ -61,19 +61,15 @@ public:
QIcon() noexcept;
QIcon(const QPixmap &pixmap);
QIcon(const QIcon &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QIcon(QIcon &&other) noexcept
: d(other.d)
{ other.d = nullptr; }
-#endif
explicit QIcon(const QString &fileName); // file or resource name
explicit QIcon(QIconEngine *engine);
~QIcon();
QIcon &operator=(const QIcon &other);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QIcon &operator=(QIcon &&other) noexcept
{ swap(other); return *this; }
-#endif
inline void swap(QIcon &other) noexcept
{ qSwap(d, other.d); }
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 9d177142d9..7c68168be8 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -151,18 +151,14 @@ public:
explicit QImage(const QString &fileName, const char *format = nullptr);
QImage(const QImage &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QImage(QImage &&other) noexcept
: QPaintDevice(), d(nullptr)
{ qSwap(d, other.d); }
-#endif
~QImage();
QImage &operator=(const QImage &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QImage &operator=(QImage &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
inline void swap(QImage &other) noexcept
{ qSwap(d, other.d); }
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index cac2ef5dfc..189e57b9a3 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -78,10 +78,8 @@ public:
void setBoundingRect(const QRect &r);
QPicture& operator=(const QPicture &p);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QPicture &operator=(QPicture &&other) noexcept
{ qSwap(d_ptr, other.d_ptr); return *this; }
-#endif
inline void swap(QPicture &other) noexcept
{ d_ptr.swap(other.d_ptr); }
void detach();
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 2103fcc58c..8c1395857e 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -73,10 +73,8 @@ public:
~QPixmap();
QPixmap &operator=(const QPixmap &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QPixmap &operator=(QPixmap &&other) noexcept
{ qSwap(data, other.data); return *this; }
-#endif
inline void swap(QPixmap &other) noexcept
{ qSwap(data, other.data); }
@@ -139,12 +137,10 @@ public:
QImage toImage() const;
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor);
static QPixmap fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags = Qt::AutoColor);
-#ifdef Q_COMPILER_RVALUE_REFS
static QPixmap fromImage(QImage &&image, Qt::ImageConversionFlags flags = Qt::AutoColor)
{
return fromImageInPlace(image, flags);
}
-#endif
bool load(const QString& fileName, const char *format = nullptr, Qt::ImageConversionFlags flags = Qt::AutoColor);
bool loadFromData(const uchar *buf, uint len, const char* format = nullptr, Qt::ImageConversionFlags flags = Qt::AutoColor);
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index c5bedb27ab..55af35a5d9 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -55,10 +55,8 @@ public:
public:
Key();
Key(const Key &other);
-#ifdef Q_COMPILER_RVALUE_REFS
Key(Key &&other) noexcept : d(other.d) { other.d = nullptr; }
Key &operator =(Key &&other) noexcept { swap(other); return *this; }
-#endif
~Key();
bool operator ==(const Key &key) const;
inline bool operator !=(const Key &key) const
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index ced166dc29..7966e35840 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -86,11 +86,9 @@ public:
QCursor(const QCursor &cursor);
~QCursor();
QCursor &operator=(const QCursor &cursor);
-#ifdef Q_COMPILER_RVALUE_REFS
QCursor(QCursor &&other) noexcept : d(other.d) { other.d = nullptr; }
inline QCursor &operator=(QCursor &&other) noexcept
{ swap(other); return *this; }
-#endif
void swap(QCursor &other) noexcept { qSwap(d, other.d); }
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index aeefb53819..eb0a6208a9 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -855,13 +855,11 @@ public:
explicit TouchPoint(int id = -1);
TouchPoint(const TouchPoint &other);
-#ifdef Q_COMPILER_RVALUE_REFS
TouchPoint(TouchPoint &&other) noexcept
: d(nullptr)
{ qSwap(d, other.d); }
TouchPoint &operator=(TouchPoint &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
~TouchPoint();
TouchPoint &operator=(const TouchPoint &other)
diff --git a/src/gui/kernel/qkeysequence.h b/src/gui/kernel/qkeysequence.h
index 5630bdda58..3dcbbe5941 100644
--- a/src/gui/kernel/qkeysequence.h
+++ b/src/gui/kernel/qkeysequence.h
@@ -186,9 +186,7 @@ public:
operator QVariant() const;
int operator[](uint i) const;
QKeySequence &operator=(const QKeySequence &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QKeySequence &operator=(QKeySequence &&other) noexcept { swap(other); return *this; }
-#endif
void swap(QKeySequence &other) noexcept { qSwap(d, other.d); }
bool operator==(const QKeySequence &other) const;
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index a463245d4d..d3a840d9ad 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -67,7 +67,6 @@ public:
QPalette(const QPalette &palette);
~QPalette();
QPalette &operator=(const QPalette &palette);
-#ifdef Q_COMPILER_RVALUE_REFS
QPalette(QPalette &&other) noexcept
: d(other.d), data(other.data)
{ other.d = nullptr; }
@@ -76,7 +75,6 @@ public:
for_faster_swapping_dont_use = other.for_faster_swapping_dont_use;
qSwap(d, other.d); return *this;
}
-#endif
void swap(QPalette &other) noexcept
{
diff --git a/src/gui/opengl/qopengldebug.h b/src/gui/opengl/qopengldebug.h
index 1ba3ef91ac..7363985d60 100644
--- a/src/gui/opengl/qopengldebug.h
+++ b/src/gui/opengl/qopengldebug.h
@@ -110,9 +110,7 @@ public:
QOpenGLDebugMessage(const QOpenGLDebugMessage &debugMessage);
QOpenGLDebugMessage &operator=(const QOpenGLDebugMessage &debugMessage);
-#ifdef Q_COMPILER_RVALUE_REFS
QOpenGLDebugMessage &operator=(QOpenGLDebugMessage &&other) noexcept { swap(other); return *this; }
-#endif
~QOpenGLDebugMessage();
void swap(QOpenGLDebugMessage &other) noexcept { qSwap(d, other.d); }
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.h b/src/gui/opengl/qopenglpixeltransferoptions.h
index be60e66e71..195543ae90 100644
--- a/src/gui/opengl/qopenglpixeltransferoptions.h
+++ b/src/gui/opengl/qopenglpixeltransferoptions.h
@@ -55,10 +55,8 @@ class Q_GUI_EXPORT QOpenGLPixelTransferOptions
public:
QOpenGLPixelTransferOptions();
QOpenGLPixelTransferOptions(const QOpenGLPixelTransferOptions &);
-#ifdef Q_COMPILER_RVALUE_REFS
QOpenGLPixelTransferOptions &operator=(QOpenGLPixelTransferOptions &&other) noexcept
{ swap(other); return *this; }
-#endif
QOpenGLPixelTransferOptions &operator=(const QOpenGLPixelTransferOptions &);
~QOpenGLPixelTransferOptions();
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<QPoint> &v) : QVector<QPoint>(v) {}
-#ifdef Q_COMPILER_RVALUE_REFS
/*implicit*/ QPolygon(QVector<QPoint> &&v) noexcept : 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) noexcept : QVector<QPoint>(std::move(other)) {}
QPolygon &operator=(QPolygon &&other) noexcept { swap(other); return *this; }
-#endif
QPolygon &operator=(const QPolygon &other) { QVector<QPoint>::operator=(other); return *this; }
void swap(QPolygon &other) noexcept { QVector<QPoint>::swap(other); } // prevent QVector<QPoint><->QPolygon swaps
@@ -145,16 +141,12 @@ public:
inline ~QPolygonF() {}
inline explicit QPolygonF(int size);
inline /*implicit*/ QPolygonF(const QVector<QPointF> &v) : QVector<QPointF>(v) {}
-#ifdef Q_COMPILER_RVALUE_REFS
/* implicit */ QPolygonF(QVector<QPointF> &&v) noexcept : 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) noexcept : QVector<QPointF>(std::move(other)) {}
QPolygonF &operator=(QPolygonF &&other) noexcept { swap(other); return *this; }
-#endif
QPolygonF &operator=(const QPolygonF &other) { QVector<QPointF>::operator=(other); return *this; }
inline void swap(QPolygonF &other) { QVector<QPointF>::swap(other); } // prevent QVector<QPointF><->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;
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 16685ed9e8..683aa3bf65 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -261,10 +261,8 @@ public:
bool operator<(const QFont &) const;
operator QVariant() const;
bool isCopyOf(const QFont &) const;
-#ifdef Q_COMPILER_RVALUE_REFS
inline QFont &operator=(QFont &&other) noexcept
{ qSwap(d, other.d); qSwap(resolve_mask, other.resolve_mask); return *this; }
-#endif
#if QT_DEPRECATED_SINCE(5, 3)
// needed for X11
diff --git a/src/gui/text/qfontmetrics.h b/src/gui/text/qfontmetrics.h
index 761cadde47..a92ee9ed2f 100644
--- a/src/gui/text/qfontmetrics.h
+++ b/src/gui/text/qfontmetrics.h
@@ -76,10 +76,8 @@ public:
~QFontMetrics();
QFontMetrics &operator=(const QFontMetrics &);
-#ifdef Q_COMPILER_RVALUE_REFS
inline QFontMetrics &operator=(QFontMetrics &&other) noexcept
{ qSwap(d, other.d); return *this; }
-#endif
void swap(QFontMetrics &other) noexcept
{ qSwap(d, other.d); }
@@ -172,10 +170,8 @@ 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
void swap(QFontMetricsF &other) { qSwap(d, other.d); }
diff --git a/src/gui/text/qglyphrun.h b/src/gui/text/qglyphrun.h
index 9bb1d3c820..15e315bea2 100644
--- a/src/gui/text/qglyphrun.h
+++ b/src/gui/text/qglyphrun.h
@@ -66,9 +66,7 @@ public:
QGlyphRun();
QGlyphRun(const QGlyphRun &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QGlyphRun &operator=(QGlyphRun &&other) noexcept { swap(other); return *this; }
-#endif
QGlyphRun &operator=(const QGlyphRun &other);
~QGlyphRun();
diff --git a/src/gui/text/qrawfont.h b/src/gui/text/qrawfont.h
index 3b84f642d3..c6289d6c93 100644
--- a/src/gui/text/qrawfont.h
+++ b/src/gui/text/qrawfont.h
@@ -79,9 +79,7 @@ public:
qreal pixelSize,
QFont::HintingPreference hintingPreference = QFont::PreferDefaultHinting);
QRawFont(const QRawFont &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QRawFont &operator=(QRawFont &&other) noexcept { swap(other); return *this; }
-#endif
QRawFont &operator=(const QRawFont &other);
~QRawFont();
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index c6a0d158c1..e8c94a6add 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -64,9 +64,7 @@ public:
QStaticText();
explicit QStaticText(const QString &text);
QStaticText(const QStaticText &other);
-#ifdef Q_COMPILER_RVALUE_REFS
QStaticText &operator=(QStaticText &&other) noexcept { swap(other); return *this; }
-#endif
QStaticText &operator=(const QStaticText &);
~QStaticText();
diff --git a/src/gui/text/qtextcursor.h b/src/gui/text/qtextcursor.h
index 4a9c614887..7cad3cc5e8 100644
--- a/src/gui/text/qtextcursor.h
+++ b/src/gui/text/qtextcursor.h
@@ -73,9 +73,7 @@ public:
explicit QTextCursor(QTextFrame *frame);
explicit QTextCursor(const QTextBlock &block);
QTextCursor(const QTextCursor &cursor);
-#ifdef Q_COMPILER_RVALUE_REFS
QTextCursor &operator=(QTextCursor &&other) noexcept { swap(other); return *this; }
-#endif
QTextCursor &operator=(const QTextCursor &other);
~QTextCursor();