Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.9
-
None
-
a017ee967 (dev), 7971dd213 (6.8), cecca90ff (dev)
Description
After da4a6cf78ff42a4f69c2775997ff174ef647f3f3, moc generates code that is slightly different from the previous, resulting in a different behaviour mode for:
class Outer { class Inner; }; class Outer::Inner : public QObject { Q_OBJECT };
This no longer compiles because class Outer::Inner is private and we can't therefore write:
template <> constexpr inline auto qt_call_create_metaobjectdata<TAG>() { return Outer::Inner::qt_create_metaobjectdata<TAG>(); }
Note that meta objects for private classes were not working properly before this change either. The following would fail to compile (and has been failing since 4.0):
class Outer { class Inner; }; class Outer::Inner : public QObject { Q_OBJECT enum E { V }; Q_ENUM(E) };
And the following even fails to moc:
class Outer { class Inner : public QObject { Q_OBJECT }; };
Output:
standard input:4:1: error: Meta object features not supported for nested classes
Attachments
Issue Links
- resulted from
-
QTBUG-111926 QFlags doesn't support large (> sizeof(int)) enums
- Closed