diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-11 00:04:55 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-11 13:05:28 +0000 |
commit | aa634f86429ad15fced74a5a65e7d170b5e7e9ff (patch) | |
tree | 21e24400e65ff10e5f45a6b93230de77b9f36aa1 /src/templates/qquickstackview_p_p.h | |
parent | 9d4c6278217fecefa15c52073f8de0e6f0e7700d (diff) |
Fix StackView attached property
The attached properties weren't initialized at all for the initial
item. Furthermore, the properties were initialized lazily, which
made them work for imperative tests, but not correctly in bindings.
Change-Id: I783c406dcf4e1cf27a6b4e6ddd43214cb06a3c7a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickstackview_p_p.h')
-rw-r--r-- | src/templates/qquickstackview_p_p.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/templates/qquickstackview_p_p.h b/src/templates/qquickstackview_p_p.h index 39a57a5d..5dfe7037 100644 --- a/src/templates/qquickstackview_p_p.h +++ b/src/templates/qquickstackview_p_p.h @@ -139,22 +139,20 @@ public: QQuickItemViewTransitioner *transitioner; }; -class QQuickStackAttachedPrivate : public QObjectPrivate +class QQuickStackAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener { Q_DECLARE_PUBLIC(QQuickStackAttached) public: - QQuickStackAttachedPrivate() : initialized(false), element(Q_NULLPTR) { } + QQuickStackAttachedPrivate() : element(Q_NULLPTR) { } static QQuickStackAttachedPrivate *get(QQuickStackAttached *attached) { return attached->d_func(); } - void init(); - void reset(); + void itemParentChanged(QQuickItem *item, QQuickItem *parent); - bool initialized; QQuickStackElement *element; }; |