summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-02-11 16:22:45 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-02-13 06:44:52 +0100
commit9585500539b3674296c61b884fe3f12363efb848 (patch)
tree0c63b91339e26cb707305dc9309593d0107f59b2 /tests
parente711eb35f54cabf8b0beff49e5b748731d042c63 (diff)
Disable warnings from using deprecated QScopedPointer::take
It's the QScopedPointer test, so we want to test deprecated APIs. Change-Id: I029103b3150c576cba9b395aafc571b9fccc914a Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
index 0cb6b59c02..967a3ccf55 100644
--- a/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
+++ b/tests/auto/corelib/tools/qscopedpointer/tst_qscopedpointer.cpp
@@ -385,7 +385,10 @@ void tst_QScopedPointer::comparison()
scopedPointerComparisonTest(pa2, pa2, pb);
scopedPointerComparisonTest(pa1, pa2, pb);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
pa2.take();
+QT_WARNING_POP
QCOMPARE( RefCounted::instanceCount.loadRelaxed(), 2 );
}
@@ -404,7 +407,10 @@ void tst_QScopedPointer::comparison()
scopedPointerComparisonTest(pa1, pa2, pb);
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
pa2.take();
+QT_WARNING_POP
QCOMPARE( RefCounted::instanceCount.loadRelaxed(), 85 );
}