qt6-bb10/tests/auto/tools
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
..
macdeployqt tst_macdeployqt: Only pass -use-debug-libs for debug-and-release builds 2024-07-19 13:42:22 +00:00
moc moc: handle nested structs with meta content 2024-11-02 02:02:09 +00:00
qdbuscpp2xml CMake: Build dbus tools when building dbus tests 2024-06-12 12:23:45 +00:00
qdbusxml2cpp CMake: Build dbus tools when building dbus tests 2024-06-12 12:23:45 +00:00
qmake Skip some build system tests if Xcode is not installed 2024-06-16 20:48:34 +00:00
qmakelib tst_qmakelib: Account for test directory with spaces in system() test 2024-07-03 18:57:34 +00:00
qt_cmake_create tst_qt_cmake_create: Skip test if CMake is not found 2024-06-18 01:34:51 +00:00
rcc Bump version to 6.8.1 2024-09-19 07:20:47 +03:00
uic tst_uic: Modernize code 2024-08-09 15:16:50 +00:00
windeployqt Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt tests/tools: only run qdbus{cpp2xml,xml2cpp} tests if D-Bus is available 2023-08-14 20:19:36 -07:00