Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.0
-
None
-
d5742fa29 (dev), 0fe0d41b4 (6.7)
Description
When trying to access the new font.variableAxes member, the following error occurs:
".variableAxes" is not available due to component versioning.
Attached (in variablefont.qml) is a minimal example to reproduce it.
The regression was introduced in the following change: https://codereview.qt-project.org/c/qt/qtdeclarative/+/544161
Apparently, the REVISION usage does not work inside Q_GADGET?
I am not sure if this is the idiomatic way to fix it (otherwise I would just open a Gerrit patch), but the following patch fixes the issue:
diff --git a/src/quick/util/qquickvaluetypes_p.h b/src/quick/util/qquickvaluetypes_p.h index 842ef387d8..3ccf3219da 100644 --- a/src/quick/util/qquickvaluetypes_p.h +++ b/src/quick/util/qquickvaluetypes_p.h @@ -408,7 +408,7 @@ class Q_QUICK_EXPORT QQuickFontValueType Q_PROPERTY(bool kerning READ kerning WRITE setKerning FINAL) Q_PROPERTY(bool preferShaping READ preferShaping WRITE setPreferShaping FINAL) Q_PROPERTY(QVariantMap features READ features WRITE setFeatures FINAL) - Q_PROPERTY(QVariantMap variableAxes READ variableAxes WRITE setVariableAxes FINAL REVISION(6, 7)) + Q_PROPERTY(QVariantMap variableAxes READ variableAxes WRITE setVariableAxes FINAL) QML_VALUE_TYPE(font) QML_FOREIGN(QFont) @@ -472,8 +472,8 @@ public: QVariantMap features() const; void setFeatures(const QVariantMap &features); - QVariantMap variableAxes() const; - void setVariableAxes(const QVariantMap &variableAxes); + Q_REVISION(6, 7) QVariantMap variableAxes() const; + Q_REVISION(6, 7) void setVariableAxes(const QVariantMap &variableAxes); operator QFont() const { return v; } };
Attachments
For Gerrit Dashboard: QTBUG-124359 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
554929,3 | Fix revisioning of the variableAxes property in the Quick Font type | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
555114,2 | Fix revisioning of the variableAxes property in the Quick Font type | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |