diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-12 02:51:43 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-12 02:51:43 (GMT) |
commit | 80b7c8439172e53b7231abf73ac534c86680b309 (patch) | |
tree | 6f77428628fe663cade1a60b1f362a56f6c15495 /src/declarative/widgets | |
parent | ac6a991f0df2abd9a5cd449402edc108cfdbe67b (diff) | |
download | Qt-80b7c8439172e53b7231abf73ac534c86680b309.zip Qt-80b7c8439172e53b7231abf73ac534c86680b309.tar.gz Qt-80b7c8439172e53b7231abf73ac534c86680b309.tar.bz2 |
Fix layout attached properties.
Diffstat (limited to 'src/declarative/widgets')
-rw-r--r-- | src/declarative/widgets/graphicslayouts.cpp | 4 | ||||
-rw-r--r-- | 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<QGraphicsLayoutItem*, QObject*> 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<QGraphicsLayoutItem*>(obj)) @@ -308,7 +308,7 @@ qreal QGraphicsGridLayoutObject::spacing() const } QHash<QGraphicsLayoutItem*, QObject*> 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<QGraphicsLayoutItem*>(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<QGraphicsLayoutItem *> *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; |