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/tools/qlinkedlist/tst_qlinkedlist.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp') diff --git a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp index df42b5dea9..b681676d09 100644 --- a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp +++ b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp @@ -29,6 +29,10 @@ #include #include +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + struct Movable { Movable(char input = 'j') : i(input), state(Constructed) @@ -1129,5 +1133,16 @@ void tst_QLinkedList::setSharableInt() const #endif } +QT_WARNING_POP +#else +class tst_QLinkedList : public QObject +{ + Q_OBJECT +private slots: + void initTestCase() { QSKIP("Deprecated APIs are disabled, skipping this test."); } +}; + +#endif // QT_DEPRECATED_SINCE(5, 15) + QTEST_APPLESS_MAIN(tst_QLinkedList) #include "tst_qlinkedlist.moc" -- cgit v1.2.3