qt6-bb10/tests/auto
Thiago Macieira 44bf5566cb moc: handle nested structs with meta content
We already disallow them for classes; this was a mistake in not handling
the "struct" keyword. The C++ syntax is valid, but moc is unable to
parse two classes at the same time. Users can define the inner outside
of the body of the outer class and that works.

[ChangeLog][moc] Fixed a bug that caused moc to attempt to parse a
nested struct (not class) with meta keywords and this produced code that
wouldn't compile. Nested classes and structures are permitted, but must
be defined outside of the declaration of the outer class.

The fix for this revealed a bug in the presence of Q_DECLARE_FLAGS for
inner classes. This can be easily fixed by moving the token for
Q_DECLARE_FLAGS value outside of the [Q_META_TOKEN_BEGIN,
Q_META_TOKEN_END] range.

[ChangeLog][moc] Fixed a bug that caused moc to reject a class (not
struct) containing Q_DECLARE_FLAGS that was defined inside the body of
an outer class containing Q_OBJECT or Q_GADGET.

Fixes: QTBUG-130498
Pick-to: 6.5
Change-Id: I2a3f148f70280e87302afffd3e7617e5861bb338
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4e4eef175bc0d0e2a34875ae98f2ddf9eee73b35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-11-02 02:02:09 +00:00
..
bic/data Add 6.8.0 binary compatibility file 2024-10-17 19:30:33 +00:00
cmake Bump version to 6.8.1 2024-09-19 07:20:47 +03:00
concurrent tst_QtConcurrentThreadEngine: fix UB (uninitialized boolean) 2024-07-06 10:17:50 +00:00
corelib tst_QPromise: remove some unneeded mutable from lambdas 2024-11-01 22:54:18 +00:00
dbus QtDBus: disallow sending method calls without destinations on a bus 2024-10-22 07:17:08 +00:00
gui QFileSystemModel on Windows: consistently trim spaces and dots 2024-10-29 17:42:12 +00:00
guiapplauncher Convert "Color Editor Factory" Example to snippets 2024-04-19 13:39:41 +02:00
network Http: fix how we treat must-revalidate 2024-10-31 15:35:47 +00:00
opengl
other Accessibility on macOS: make treeview test more reliable 2024-08-22 04:40:28 +00:00
printsupport tests: blacklist tst_QPrinter::testPrintPreviewDialog() 2024-08-12 09:43:38 +00:00
shared Introduce flag to use typographical line metrics for fonts 2024-05-31 19:30:53 +02:00
sql Tests/QSqlQuery: fix tst_QSqlQuery::lastInsertId() for PostgreSQL 2024-10-31 19:46:55 +00:00
testlib tst_selftests: disable Valgrind tests with AVX512/AVX10 2024-10-29 23:52:25 +00:00
tools moc: handle nested structs with meta content 2024-11-02 02:02:09 +00:00
wasm CMake: Fix PUBLIC_LIBRARIES option is deprecated in tests warning 2024-10-30 10:57:15 +01:00
widgets QStyle: block future changes that result in QPainter warnings 2024-11-01 22:54:06 +00:00
xml QtXml: be systematic about feature dom 2024-08-29 18:21:29 +00:00
CMakeLists.txt tst_QSettings: port to QTEST_THROW_ON_FAIL 2024-06-27 06:06:02 +00:00
network-helpers.h Fix prior change: no need for check when OpenSSL is active backend 2024-10-26 00:04:46 +00:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00