From 2ab873ed5fbb43404f119ef05b412485665a975f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 30 Mar 2012 10:48:50 +1000 Subject: Size loaded item before bindings are evaluated If the Loader size is set explicitly we can set the item size before the bindings are run, and avoiding an additional anchor layout. Also ensure item implict size changes are propagated/notified in the Loader. Change-Id: Ie22b018b22be8457ccf30b907a26e44260b9cef7 Reviewed-by: Michael Brasser --- src/quick/items/qquickloader_p_p.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/quick/items/qquickloader_p_p.h') diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h index 1ad7756ed8..0978911315 100644 --- a/src/quick/items/qquickloader_p_p.h +++ b/src/quick/items/qquickloader_p_p.h @@ -87,6 +87,8 @@ public: ~QQuickLoaderPrivate(); void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry); + void itemImplicitWidthChanged(QQuickItem *); + void itemImplicitHeightChanged(QQuickItem *); void clear(); void initResize(); void load(); @@ -97,6 +99,9 @@ public: QUrl resolveSourceUrl(QQmlV8Function *args); v8::Handle extractInitialPropertyValues(QQmlV8Function *args, QObject *loader, bool *error); + virtual qreal getImplicitWidth() const; + virtual qreal getImplicitHeight() const; + QUrl source; QQuickItem *item; QQmlComponent *component; @@ -105,8 +110,6 @@ public: v8::Persistent initialPropertyValues; v8::Persistent qmlGlobalForIpv; bool updatingSize: 1; - bool itemWidthValid : 1; - bool itemHeightValid : 1; bool active : 1; bool loadingFromSource : 1; bool asynchronous : 1; -- cgit v1.2.3