From 80b7c8439172e53b7231abf73ac534c86680b309 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 12 Aug 2009 12:51:43 +1000 Subject: Fix layout attached properties. --- src/declarative/widgets/graphicslayouts.cpp | 4 ++-- src/declarative/widgets/graphicslayouts.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/declarative/widgets/graphicslayouts.cpp b/src/declarative/widgets/graphicslayouts.cpp index 35f1e35..34d18e4 100644 --- a/src/declarative/widgets/graphicslayouts.cpp +++ b/src/declarative/widgets/graphicslayouts.cpp @@ -148,7 +148,7 @@ void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt: } QHash QGraphicsLinearLayoutObject::attachedProperties; -QObject *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) +LinearLayoutAttached *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) { // ### This is not allowed - you must attach to any object if (!qobject_cast(obj)) @@ -308,7 +308,7 @@ qreal QGraphicsGridLayoutObject::spacing() const } QHash QGraphicsGridLayoutObject::attachedProperties; -QObject *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) +GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) { // ### This is not allowed - you must attach to any object if (!qobject_cast(obj)) diff --git a/src/declarative/widgets/graphicslayouts.h b/src/declarative/widgets/graphicslayouts.h index ab8ad90..13811eb 100644 --- a/src/declarative/widgets/graphicslayouts.h +++ b/src/declarative/widgets/graphicslayouts.h @@ -82,7 +82,7 @@ public: QmlList *children() { return &_children; } - static QObject *qmlAttachedProperties(QObject *); + static LinearLayoutAttached *qmlAttachedProperties(QObject *); private Q_SLOTS: void updateStretch(QGraphicsLayoutItem*,int); @@ -124,6 +124,7 @@ private: // -fixed/min/max/preferred width // -spacing // -stretch +class GridLayoutAttached; class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout { Q_OBJECT @@ -142,7 +143,7 @@ public: qreal spacing() const; - static QObject *qmlAttachedProperties(QObject *); + static GridLayoutAttached *qmlAttachedProperties(QObject *); private: friend class GraphicsLayoutAttached; -- cgit v0.12