Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0
-
None
Description
Trying to create a value type for the qtlocation qml import. I have set up the actual data class (a POD class with operator= and copy cons), a subclass of QQmlValueTypeBase<POD>, and a subclass of QQmlValueTypeProvider (with all the appropriate private bool methods overridden). I then call QQml_addValueTypeProvider() with an instance of the QQmlValueTypeProvider subclass that I defined, and also call qmlRegisterValueTypeEnums on the QQmlValueTypeBase subclass.
At this point, it doesn't seem to work. The methods I defined in the provider never get called for properties of the POD type. I discussed this with mvogt and chriadam and it seems value types are only accepted at present for qmetatype ids < 255 (and of course being a custom qmetatype, my POD class gets a much higher id).
Attachments
For Gerrit Dashboard: QTBUG-26352 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
31871,6 | Permit value types with metatype IDs >= QMetaType::User | master | qt/qtdeclarative | Status: MERGED | +2 | 0 |