Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Thiago Macieira
On Friday 4 October 2024 07:42:39 GMT-7 Phil Thompson via Development wrote: > Understood - but there seems to be no obvious way to dynamically create > and register a valid QMetaType. What do you mean by a dynamic meta type? Are you trying to wrap some other language? Because if the type exists

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Phil Thompson via Development
On 04/10/2024 15:32, Thiago Macieira wrote: On Friday 4 October 2024 05:43:38 GMT-7 Phil Thompson via Development wrote: For dynamically created meta-objects... - the results were dependent on the version of Qt - QMetaProperty.metaType().isValid() always returned false - QMetaProperty.isEnumTyp

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Thiago Macieira
On Friday 4 October 2024 05:43:38 GMT-7 Phil Thompson via Development wrote: > For dynamically created meta-objects... > > - the results were dependent on the version of Qt > - QMetaProperty.metaType().isValid() always returned false > - QMetaProperty.isEnumType() returned true for v6.7.1 and fals

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Fabian Kosmale via Development
Hi, QMetaProperty::isEnumType's documentation probably should be adjusted to mention that it really is about having an enum marked with Q_ENUM, not about generic C++ enums. For your use-case: I suspect you need to create a dynamic meta-type for your enum (or rather, the QtPrivate::QMetaTypeI

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Thiago Macieira
On Thursday 3 October 2024 08:07:20 GMT-7 Phil Thompson via Development wrote: > > Or you can set the EnumOrFlag flag in the QMetaProperty flags field to > > force the > > constructor to search. > > Sorry, can you be more specific? I can't see how to do it given the > private nature of the flags.

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Phil Thompson via Development
Hi Fabian, The change was https://codereview.qt-project.org/c/qt/qtbase/+/559265 Reverting this change means I get the same behaviour as I get with v6.7. I am (and always have been) using QMetaObjectBuilder and addEnumerator() (the overload that takes a QByteArray argument). I've compared th

Re: [Development] Changed enum property behaviour in Qt v6.8

2024-10-04 Thread Fabian Kosmale via Development
Hi Phil, I'm not quite sure which change caused the issue, and I believe a bugreport with a reproducer might shed some light on the issue. Nevertheless, if you're already using the private QMetaObjectBuilder API, I would expect that it should work if you build the enum also dynamically via a