Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.0.0
-
None
-
e76ba402bfe309022a0be29c6bc8223f8f3f94b3
Description
Consider the attached example (a self-contained unit test).
The Derived class is exported to QML using qmlRegisterType. The Base class is exported to QML as an uncreatable type. However, to support REVISION 1 in the Base class, we must use qmlRegisterRevision. This fails for 2 reasons.
1) qmlRegisterRevision requires the class to be 'creatable' (it's not)
2) qmlRegisterRevision replaces data set by qmlRegisterUncreatableType (and vice versa)
I'm not sure if it's feasible to change the behaviour or qmlRegisterRevision so I propose adding a new method, qmlRegisterUncreatableType<T,int> that allows setting the REVISION for an uncreatable base class.
The attached example contains an implementation of this method that allows it to work as expected.