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>
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.