diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-09-14 22:02:55 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-09 13:06:35 +0000 |
commit | 8e7d1a91196197eee4e45bbfa9886ab935e2b67c (patch) | |
tree | 9bc7bb0e99dfa5216a6b71941171b2251c77bd38 /tests/auto/qml/qqmllanguage/testtypes.h | |
parent | d9541bde71f1adc81753283dc40ea6a8af009d8a (diff) |
Make QML composite types inherit attached properties
Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe
Task-number: QTBUG-43581
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.h')
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 985acc2539..c64fda5ea1 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -1086,6 +1086,7 @@ class MyCompositeBaseType : public QObject public: enum CompositeEnum { EnumValue0, EnumValue42 = 42 }; + static QObject *qmlAttachedProperties(QObject *parent) { return new QObject(parent); } }; Q_DECLARE_METATYPE(MyEnum2Class::EnumB) @@ -1100,6 +1101,7 @@ QML_DECLARE_TYPE(MyRevisionedSubclass) QML_DECLARE_TYPE(MySubclass) QML_DECLARE_TYPE(MyReceiversTestObject) QML_DECLARE_TYPE(MyCompositeBaseType) +QML_DECLARE_TYPEINFO(MyCompositeBaseType, QML_HAS_ATTACHED_PROPERTIES) class CustomBinding : public QObject, public QQmlParserStatus { |