aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/layouts/qquicklayout_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2016-07-08 13:25:02 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2016-11-30 08:31:52 +0000
commit3b4f00ecb54432f514f184c251a316896a88f91a (patch)
treef39299a24451d8e7f7beb17eb314247d5481c2fc /src/imports/layouts/qquicklayout_p.h
parent39496a40748be1d60c909ba679c45c788ec6412f (diff)
Layouts: Use QQuickItemChangeListener for more things
Signal connections are expensive: even with qmlobject_connect, there's a bunch of memory allocation. By avoiding the signal connections, we can do the same thing essentially, a little faster. This gives me another 15-20 RowLayout instances per frame when testing with RowLayout containing 5 Rectangles on qmlbench (from ~139 to ~155 ops/frame). Change-Id: I4448a28128dc251e40b6b06d642bae716af212f4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/imports/layouts/qquicklayout_p.h')
-rw-r--r--src/imports/layouts/qquicklayout_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/layouts/qquicklayout_p.h b/src/imports/layouts/qquicklayout_p.h
index c7f04c1fed..eece6f8658 100644
--- a/src/imports/layouts/qquicklayout_p.h
+++ b/src/imports/layouts/qquicklayout_p.h
@@ -99,6 +99,10 @@ public:
/* QQuickItemChangeListener */
void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemImplicitWidthChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemImplicitHeightChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemVisibilityChanged(QQuickItem *item) Q_DECL_OVERRIDE;
protected:
void updatePolish() Q_DECL_OVERRIDE;