diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-21 18:34:21 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-09-26 12:32:17 +0200 |
commit | cc1a604c704f848927b3fa0a97b0a50b0b79d2a4 (patch) | |
tree | 610ece713eba021c8e5a3d248f54a62370e810f8 /src/quick/items/qquickitemanimation_p.h | |
parent | 531cf90305ae50920b2e597dd0758fdb82ad88b0 (diff) |
Specify parameters of type registration in class declarations
Using this technique we can automatically register all necessary
revisions and minor versions of a type, using the metaobject system.
This greatly reduces the potential for mistakes and resulting
incompatibilities between versions of imports.
We assume that for each type we need to register all revisions of its
super types and its attached type, and that the revisions match. That
is, if you import version X of type A, you will also get version X of
its attached type and of any super types. As we previously didn't take
these dependencies into account when manually registering the types, a
number of extra revisions are now registered for some types.
Potentially, we can now generate the qmltypes files at compile time,
using moc.
Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/qquickitemanimation_p.h')
-rw-r--r-- | src/quick/items/qquickitemanimation_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemanimation_p.h b/src/quick/items/qquickitemanimation_p.h index b803455f12..28c18c874d 100644 --- a/src/quick/items/qquickitemanimation_p.h +++ b/src/quick/items/qquickitemanimation_p.h @@ -66,6 +66,7 @@ class Q_AUTOTEST_EXPORT QQuickParentAnimation : public QQuickAnimationGroup Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged) Q_PROPERTY(QQuickItem *newParent READ newParent WRITE setNewParent NOTIFY newParentChanged) Q_PROPERTY(QQuickItem *via READ via WRITE setVia NOTIFY viaChanged) + QML_NAMED_ELEMENT(ParentAnimation) public: QQuickParentAnimation(QObject *parent=nullptr); @@ -100,6 +101,7 @@ class Q_AUTOTEST_EXPORT QQuickAnchorAnimation : public QQuickAbstractAnimation Q_PROPERTY(QQmlListProperty<QQuickItem> targets READ targets) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) + QML_NAMED_ELEMENT(AnchorAnimation) public: QQuickAnchorAnimation(QObject *parent=nullptr); @@ -143,6 +145,7 @@ class Q_AUTOTEST_EXPORT QQuickPathAnimation : public QQuickAbstractAnimation Q_PROPERTY(int orientationEntryDuration READ orientationEntryDuration WRITE setOrientationEntryDuration NOTIFY orientationEntryDurationChanged) Q_PROPERTY(int orientationExitDuration READ orientationExitDuration WRITE setOrientationExitDuration NOTIFY orientationExitDurationChanged) Q_PROPERTY(qreal endRotation READ endRotation WRITE setEndRotation NOTIFY endRotationChanged) + QML_NAMED_ELEMENT(PathAnimation) public: QQuickPathAnimation(QObject *parent=nullptr); |