diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-02 11:51:14 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-06 11:00:38 +0000 |
commit | 1ef274fb947f86731d062df2128718cc8a0cf643 (patch) | |
tree | 51658c038b9de841c478c52bc423cc59b7d8897a /src/gui | |
parent | 980755bbcfae1b5da4b5dbdd039b28d05bfdf938 (diff) |
Replace qMove with std::move
Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qimage.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qevent.h | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglgradientcache_p.h | 2 | ||||
-rw-r--r-- | src/gui/painting/qbrush.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 4 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index c85a51e082..64e24fce44 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1396,7 +1396,7 @@ void QImage::setColorTable(const QVector<QRgb> colors) #if QT_VERSION >= QT_VERSION_CHECK(6,0,0) d->colortable = colors; #else - d->colortable = qMove(const_cast<QVector<QRgb>&>(colors)); + d->colortable = std::move(const_cast<QVector<QRgb>&>(colors)); #endif d->has_alpha_clut = false; for (int i = 0; i < d->colortable.size(); ++i) { @@ -5587,7 +5587,7 @@ Q_GUI_EXPORT void qt_imageTransform(QImage &src, QImageIOHandler::Transformation if (orient == QImageIOHandler::TransformationRotate270) { src = rotated270(src); } else { - src = qMove(src).mirrored(orient & QImageIOHandler::TransformationMirror, + src = std::move(src).mirrored(orient & QImageIOHandler::TransformationMirror, orient & QImageIOHandler::TransformationFlip); if (orient & QImageIOHandler::TransformationRotate90) src = rotated90(src); diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h index a4ec7aa69b..9d177142d9 100644 --- a/src/gui/image/qimage.h +++ b/src/gui/image/qimage.h @@ -291,11 +291,11 @@ public: QImage mirrored(bool horizontally = false, bool vertically = true) const & { return mirrored_helper(horizontally, vertically); } QImage &&mirrored(bool horizontally = false, bool vertically = true) && - { mirrored_inplace(horizontally, vertically); return qMove(*this); } + { mirrored_inplace(horizontally, vertically); return std::move(*this); } QImage rgbSwapped() const & { return rgbSwapped_helper(); } QImage &&rgbSwapped() && - { rgbSwapped_inplace(); return qMove(*this); } + { rgbSwapped_inplace(); return std::move(*this); } #else QImage mirrored(bool horizontally = false, bool vertically = true) const; QImage rgbSwapped() const; diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index de175bc334..aeefb53819 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -549,7 +549,7 @@ public: }; class Attribute { public: - Attribute(AttributeType typ, int s, int l, QVariant val) : type(typ), start(s), length(l), value(qMove(val)) {} + Attribute(AttributeType typ, int s, int l, QVariant val) : type(typ), start(s), length(l), value(std::move(val)) {} Attribute(AttributeType typ, int s, int l) : type(typ), start(s), length(l), value() {} AttributeType type; diff --git a/src/gui/opengl/qopenglgradientcache_p.h b/src/gui/opengl/qopenglgradientcache_p.h index cbdbbb0c54..1d34223bdd 100644 --- a/src/gui/opengl/qopenglgradientcache_p.h +++ b/src/gui/opengl/qopenglgradientcache_p.h @@ -66,7 +66,7 @@ class QOpenGL2GradientCache : public QOpenGLSharedResource struct CacheInfo { inline CacheInfo(QGradientStops s, qreal op, QGradient::InterpolationMode mode) : - stops(qMove(s)), opacity(op), interpolationMode(mode) {} + stops(std::move(s)), opacity(op), interpolationMode(mode) {} GLuint texId; QGradientStops stops; diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index ed575abf54..1aa0ee14be 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1140,11 +1140,11 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) if (s.version() >= QDataStream::Qt_5_5) { QImage img; s >> img; - b.setTextureImage(qMove(img)); + b.setTextureImage(std::move(img)); } else { QPixmap pm; s >> pm; - b.setTexture(qMove(pm)); + b.setTexture(std::move(pm)); } } else if (style == Qt::LinearGradientPattern || style == Qt::RadialGradientPattern diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index afa540380f..2c99671d0b 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4244,7 +4244,7 @@ public: struct CacheInfo : QSpanData::Pinnable { inline CacheInfo(QGradientStops s, int op, QGradient::InterpolationMode mode) : - stops(qMove(s)), opacity(op), interpolationMode(mode) {} + stops(std::move(s)), opacity(op), interpolationMode(mode) {} QRgba64 buffer64[GRADIENT_STOPTABLE_SIZE]; QRgb buffer32[GRADIENT_STOPTABLE_SIZE]; QGradientStops stops; diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 99b04aaba6..c21f2cdda4 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -73,7 +73,7 @@ int QTextureGlyphCache::calculateSubPixelPositionCount(glyph_t glyph) const if (path.isEmpty()) break; - images[numImages++] = qMove(img); + images[numImages++] = std::move(img); } else { bool found = false; for (int j = 0; j < numImages; ++j) { @@ -83,7 +83,7 @@ int QTextureGlyphCache::calculateSubPixelPositionCount(glyph_t glyph) const } } if (!found) - images[numImages++] = qMove(img); + images[numImages++] = std::move(img); } } |