diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-03-04 15:21:40 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-03-06 09:50:35 +0100 |
commit | 249a2e3271c3cc36edb88c993d277d93de2cf1c0 (patch) | |
tree | 1ccbc0c79da459d8ada8a399129b92c3589f2b97 /tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp | |
parent | 1a9c29289a76454e8b361430dd7f025f8fdc3061 (diff) |
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 <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 <QtTest/QtTest> #include <QLinkedList> +#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" |