aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem/tst_qquickitem.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-02-11 16:33:46 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-12 16:18:27 +0000
commit0e92e0bd6e7209ad491472b3928840ad78c5371a (patch)
tree1195f62920b2fbc74e0c0efdbf5912b884a1b383 /tests/auto/quick/qquickitem/tst_qquickitem.cpp
parente33794e0537efbb22f9d8c4d528bfa062335da03 (diff)
Replace QScopedPointer with std::unique_ptr
Fix compiler warning, QScopedPointer::take was deprecated in Qt 6.1. Change-Id: I67045bce97efb082b1b7467a6c24d5dbf996fdc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 070072e7cabd6f4f26f4938b1616e56254ad25d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick/qquickitem/tst_qquickitem.cpp')
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index 61780fc405..7860f5677a 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -1986,7 +1986,7 @@ public slots:
void tst_qquickitem::testSGInvalidate()
{
for (int i=0; i<2; ++i) {
- QScopedPointer<QQuickView> view(new QQuickView());
+ std::unique_ptr<QQuickView> view(new QQuickView());
InvalidatedItem *item = new InvalidatedItem();
@@ -2003,9 +2003,9 @@ void tst_qquickitem::testSGInvalidate()
item->setParentItem(view->contentItem());
view->show();
- QVERIFY(QTest::qWaitForWindowExposed(view.data()));
+ QVERIFY(QTest::qWaitForWindowExposed(view.get()));
- delete view.take();
+ view.reset();
QCOMPARE(invalidateSpy.size(), expected);
}
}