From 42c04ed29c36eec70cdce58e5c2d19faec62d039 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Thu, 17 Sep 2015 14:24:03 +0200 Subject: Fix {Row|Grid}Layout to adhere to sibling order of its children In order to reduce the number of temporary calls to updateLayoutItems, I should postpone it until the item is completed. This will be a separate patch. This is a backport of change 59f7b30d41b06b1d9da81aea5784d57ecd91ab04 Change-Id: Iee495ee3d85a03407b06d06d8076c5c63d3d20cf Task-number: QTBUG-45152 Reviewed-by: Ulf Hermann --- src/layouts/qquicklayout_p.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/layouts/qquicklayout_p.h') diff --git a/src/layouts/qquicklayout_p.h b/src/layouts/qquicklayout_p.h index d613f5bd..4379d7f8 100644 --- a/src/layouts/qquicklayout_p.h +++ b/src/layouts/qquicklayout_p.h @@ -40,6 +40,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -53,7 +54,8 @@ class QQuickLayoutAttached; #endif class QQuickLayoutPrivate; -class QQuickLayout : public QQuickItem +class QQuickLayout : public QQuickItem, public QQuickItemChangeListener + { Q_OBJECT public: @@ -92,6 +94,9 @@ public: bool isReady() const; + /* QQuickItemChangeListener */ + void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE; + protected: void updatePolish() Q_DECL_OVERRIDE; -- cgit v1.2.1