From 72f565838c5d9f8ee8984d2a7b3586b1d51e656d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 13 Aug 2009 15:58:42 +1000 Subject: Make the QFxBorderImage the parent of its QFxScaleGrid --- src/declarative/fx/qfxborderimage_p.h | 3 ++- src/declarative/fx/qfxscalegrid.cpp | 2 +- src/declarative/fx/qfxscalegrid_p.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/declarative/fx/qfxborderimage_p.h b/src/declarative/fx/qfxborderimage_p.h index 104f0f3..809b00d 100644 --- a/src/declarative/fx/qfxborderimage_p.h +++ b/src/declarative/fx/qfxborderimage_p.h @@ -77,8 +77,9 @@ public: QFxScaleGrid *getScaleGrid() { + Q_Q(QFxBorderImage); if (!border) - border = new QFxScaleGrid; + border = new QFxScaleGrid(q); return border; } diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/fx/qfxscalegrid.cpp index 60ab418..53c63a5 100644 --- a/src/declarative/fx/qfxscalegrid.cpp +++ b/src/declarative/fx/qfxscalegrid.cpp @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE */ QML_DEFINE_NOCREATE_TYPE(QFxScaleGrid) -QFxScaleGrid::QFxScaleGrid() : QObject(), _left(0), _top(0), _right(0), _bottom(0) +QFxScaleGrid::QFxScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0) { } diff --git a/src/declarative/fx/qfxscalegrid_p.h b/src/declarative/fx/qfxscalegrid_p.h index 4beec85..7df90f1 100644 --- a/src/declarative/fx/qfxscalegrid_p.h +++ b/src/declarative/fx/qfxscalegrid_p.h @@ -67,7 +67,7 @@ class Q_DECLARATIVE_EXPORT QFxScaleGrid : public QObject Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY borderChanged) public: - QFxScaleGrid(); + QFxScaleGrid(QObject *parent=0); ~QFxScaleGrid(); bool isNull() const; -- cgit v0.12