Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.0 RC
-
None
-
ae9be1a63d7b579fb5bb8b4bf903f1a3efe7168f
Description
Consider the example:
There are two almost identical namespaces with Q_NAMESPACE. Each one has an enum, with a Q_ENUM_NS, and a Q_DECLARE_METATYPE. In the same header as one of them (foo.h) there are two more classes, one QObject, and one Q_GADGET. Each of them contains a property for each of the enums.
One would expect that reading the properties through the meta object system would result in the same behavior for both enums.
Yet, the enum included in the same header as the class declarations is treated as plain int, and the one from a separate header is treated as named enum with a proper type. This can easily be seen when passing them all through qDebug() as main.cpp does.
Attachments
Issue Links
- resulted in
-
QTBUG-71966 Enum type is returned as object instead of number
-
- Closed
-