Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.4.1
-
Fix Version/s: 5.10.0 Alpha
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:None
-
Environment:
Okay, I think using a delegating constructor that is actually possible now.
Description
The QQmlPropertyMap protected template constructor is defined as:
template<class DerivedType>
QQmlPropertyMap(DerivedType *derived, QObject *parentObj)
: QObject(*allocatePrivate(), parentObj)
Here, the result of allocatePrivate() dereferencing is of type QObjectPrivate, which has unstable ABI (i.e. its size can change).
So the code using this constructor (i.e. gsettings-qt does it) will break whenever QObjectPrivate changes, which is not ideal.
As Qt promises being binary compatible, such stuff should not be exposed in public headers.