From 249a2e3271c3cc36edb88c993d277d93de2cf1c0 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 4 Mar 2020 15:21:40 +0100 Subject: Disable warnings for the deprecated QLinkedList QLinkedList has been deprecated, but we still need to test it. Suppress the warnings for QLinkedList used in tests. Note, that I had to move some of the test code, to avoid repeating QT_WARNING_PUSH/QT_WARNING_POP everywhere. Change-Id: I4203b3ef50045c4f45475a08638dbdc60f68761d Reviewed-by: Lars Knoll --- tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp') diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 5af1353a0f..70bda1a0ef 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3885,12 +3885,17 @@ void tst_QVariant::moreCustomTypes() PLAY_WITH_VARIANT(data, false, QString(), 0, false); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED { QList > data; PLAY_WITH_VARIANT(data, false, QString(), 0, false); data << (QLinkedList() << 42); PLAY_WITH_VARIANT(data, false, QString(), 0, false); } +QT_WARNING_POP +#endif } void tst_QVariant::movabilityTest() -- cgit v1.2.3