Silence warning about deliberately using deprecated API

We test moc's support for [[deprecated]], so don't warn about it.

Pick-to: 6.5
Change-Id: Ifda2b81c14cb9802db4bb1d0a1eb17d978ad492a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Volker Hilsheimer 2023-03-04 10:04:52 +01:00
parent 05a7cbef5b
commit 73f04faa07

View File

@ -4026,7 +4026,9 @@ void tst_Moc::cxx17Namespaces()
void tst_Moc::cxxAttributes()
{
QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED
auto so = CppAttribute::staticMetaObject;
QT_WARNING_POP
QCOMPARE(so.className(), "CppAttribute");
QCOMPARE(so.enumeratorCount(), 0);
QVERIFY(so.indexOfSignal("deprecatedSignal") != 1);