Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.13.0
-
None
Description
Hello,
We're using [Verdigris|https://github.com/woboq/verdigris] to register our own schema-derived types with Qml. Some of these are templated, and their meta-object name carries a template-parameter, like this:
TupleProxy<Ts...>
When registering these with qmlRegisterType/qmlRegisterUncreatableType, it also tries to register the ListProperty Type:
QQmlListProperty<TupleProxy<Ts...>>
Unfortunately, QMetaObject::normalizedType() deals with the double ">>" in the manner that was required pre-C++11, and inserts a space, resulting in
QQmlListProperty<TupleProxy<Ts...> >
Which leads to the registration erroring out.
I see two options to fix this:
1) Modify the QML_GETTYPENAMES macro to check for a trailing '>', and insert the extra space in listName
or
2) Modify the behaviour of normalizedType() to not insert the extra space. This might break compatibility or lead to other unexpected issues.
Please let me know what you think about this issue. I can provide a patch for approach 1)
Regards,
Jonathan