diff options
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r-- | tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 33e8671671..39d58effd3 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -118,6 +118,7 @@ private slots: void refUnref(); void copy(); + void move(); void deepCopyPreservesDpr(); void dprPassthrough(); void depthOfNullObjects(); @@ -1142,6 +1143,20 @@ void tst_QPixmap::copy() QCOMPARE(trans, transCopy); } +void tst_QPixmap::move() +{ + QPixmap moveFrom(32, 32); + + QPixmap moveAssigned; + moveAssigned = std::move(moveFrom); + QVERIFY(!moveAssigned.isNull()); + QVERIFY(moveFrom.isNull()); + + QPixmap moveConstructed(std::move(moveAssigned)); + QVERIFY(moveAssigned.isNull()); + QVERIFY(!moveConstructed.isNull()); +} + // QTBUG-58653: Force a deep copy of a pixmap by // having a QPainter and check whether DevicePixelRatio is preserved void tst_QPixmap::deepCopyPreservesDpr() |