summaryrefslogtreecommitdiff
path: root/src/layouts/qquicklayout_p.h
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2015-09-17 14:24:03 +0200
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2015-10-30 15:52:05 +0000
commit42c04ed29c36eec70cdce58e5c2d19faec62d039 (patch)
tree94ddaa381efb5b117fd40d01d16b8457e4dd8506 /src/layouts/qquicklayout_p.h
parentafbf1fcb251c1f751758f62317f1cd9795b79310 (diff)
downloadqtquickcontrols-42c04ed29c36eec70cdce58e5c2d19faec62d039.tar.gz
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 <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/layouts/qquicklayout_p.h')
-rw-r--r--src/layouts/qquicklayout_p.h7
1 files changed, 6 insertions, 1 deletions
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 <QPointer>
#include <QQuickItem>
#include <private/qquickitem_p.h>
+#include <QtQuick/private/qquickitemchangelistener_p.h>
#include <QtGui/private/qlayoutpolicy_p.h>
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;