Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.x
Description
Some Q_GADGET types (QFont, etc.) might have extension types that wrap the calls to the gadget types. In a nutshell, the logic within the engine and compilers should be: if there's an extension type that "overwrites" a property (thus its READ/WRITE/...) of the extended type, use that extension type instead when interacting with such property.
For example, we should prefer using property `pointSize` from QQuickFontValueType when interacting with QFont, not the QFont's `pointSize` property.
However, we do not have any good way to create an extension type for a gadget (there's qmlExtendedObject() in qqml.h but it only works for QObject * - so gadgets are out).
At present, gadget type objects are reinterpret_cast'ed into extension type objects (relying on the fact that extension types for gadgets in Qt only contain the gadget type they extend), this might get messy if we ever allow users to have their extensions on gadgets.
Attachments
Issue Links
- relates to
-
QTBUG-82443 Value types and Containers in QML
- Closed
-
QTBUG-104379 [REG 6.3.0 -> 6.3.1] Crash when trying to debug QML Application
- Closed