diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-11 16:33:46 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-02-12 10:43:11 +0100 |
commit | 070072e7cabd6f4f26f4938b1616e56254ad25d9 (patch) | |
tree | e1a96059a8fbfdb8422938f6e3c34b58995ec5fc /tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp | |
parent | 165ba01a6833e88896cf3f323d8fad67561e1edd (diff) |
Replace QScopedPointer with std::unique_ptr
Fix compiler warning, QScopedPointer::take was deprecated in Qt 6.1.
Pick-to: 6.1
Change-Id: I67045bce97efb082b1b7467a6c24d5dbf996fdc1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp')
-rw-r--r-- | tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp index d70a23061b..b5ab520055 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp +++ b/tests/auto/quick/qquickmultipointtoucharea/tst_qquickmultipointtoucharea.cpp @@ -1177,7 +1177,7 @@ void tst_QQuickMultiPointTouchArea::transformedTouchArea() QQuickView *tst_QQuickMultiPointTouchArea::createAndShowView(const QString &file) { - QScopedPointer<QQuickView> window(new QQuickView(nullptr)); + std::unique_ptr<QQuickView> window(new QQuickView(nullptr)); window->setSource(testFileUrl(file)); if (window->status() != QQuickView::Ready) return nullptr; @@ -1186,9 +1186,9 @@ QQuickView *tst_QQuickMultiPointTouchArea::createAndShowView(const QString &file const QPoint offset = QPoint(size.width() / 2, size.height() / 2); window->setFramePosition(screenGeometry.center() - offset); window->show(); - if (!QTest::qWaitForWindowExposed(window.data())) + if (!QTest::qWaitForWindowExposed(window.get())) return nullptr; - return window.take(); + return window.release(); } void tst_QQuickMultiPointTouchArea::mouseInteraction_data() |