diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-02-17 17:51:49 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-17 19:57:54 +0000 |
commit | 86c5a337e3b123f2e41c8b15b416f39655519acd (patch) | |
tree | efa0f720a190889b3d31ddbd07cee0495b8a15d4 /tests/auto/gui | |
parent | 47ca3f78139ad51a5018dcdad27fa5caf817f08d (diff) | |
parent | 6620045fcaada61a2897195f32c0ee35beebc37b (diff) |
Merge "Merge dev into 5.7" into refs/staging/5.7
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/image/qicon/tst_qicon.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/painting/qregion/tst_qregion.cpp | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp index ff88b62c32..079b14a64e 100644 --- a/tests/auto/gui/image/qicon/tst_qicon.cpp +++ b/tests/auto/gui/image/qicon/tst_qicon.cpp @@ -642,6 +642,10 @@ void tst_QIcon::fromTheme() QIcon::setThemeName(""); abIcon = QIcon::fromTheme("address-book-new"); QVERIFY(abIcon.isNull()); + + // Passing a full path to fromTheme is not very useful, but should work anyway + QIcon fullPathIcon = QIcon::fromTheme(m_pngImageFileName); + QVERIFY(!fullPathIcon.isNull()); } void tst_QIcon::fromThemeCache() diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp index 7292841e5d..d24435198e 100644 --- a/tests/auto/gui/painting/qregion/tst_qregion.cpp +++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp @@ -45,6 +45,7 @@ public: tst_QRegion(); private slots: + void moveSemantics(); void boundingRect(); void rects(); void swap(); @@ -93,6 +94,28 @@ tst_QRegion::tst_QRegion() { } +void tst_QRegion::moveSemantics() +{ + const QRegion rect(QRect(0, 0, 100, 100)); + + // move assignment + { + QRegion r1 = rect; + QRegion r2; + r2 = std::move(r1); + QVERIFY(r1.isNull()); + QCOMPARE(r2, rect); + } + + // move construction + { + QRegion r1 = rect; + QRegion r2 = std::move(r1); + QVERIFY(r1.isNull()); + QCOMPARE(r2, rect); + } +} + void tst_QRegion::boundingRect() { { |