From 84ab6c1aa1fe4051edb9f96714f0f691d639b725 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Wed, 3 Aug 2022 09:16:27 +0200 Subject: moc: handle attributes in class declarations We already had code to handle attributes on funtcions, but we didn't handle them correctly for classes so far. Fix this by simply skipping over the attribute. Fixes: QTBUG-105310 Pick-to: 5.15 6.2 6.3 6.4 Change-Id: Ic4149f940e74820de4f2fa9540d9dc5b4e626a3a Reviewed-by: Marc Mutz Reviewed-by: Qt CI Bot --- tests/auto/tools/moc/cxx-attributes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/tools/moc/cxx-attributes.h b/tests/auto/tools/moc/cxx-attributes.h index 799a13293c..6301d7804c 100644 --- a/tests/auto/tools/moc/cxx-attributes.h +++ b/tests/auto/tools/moc/cxx-attributes.h @@ -10,7 +10,7 @@ QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wunknown-attributes") QT_WARNING_DISABLE_GCC("-Wattributes") -class CppAttribute : public QObject +class [[deprecated]] CppAttribute : public QObject { Q_OBJECT signals: -- cgit v1.2.3