summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxrect.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-05-27 07:20:56 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-05-27 07:20:56 (GMT)
commit68c915846e8820e008d15fb3453aa6f45d5becf4 (patch)
treecfdb6c5aa0a0027072dd76610679748a78cd0533 /src/declarative/fx/qfxrect.h
parentcc31d8c9de2dd6d8f0f60a00d8b0dc2576a8a829 (diff)
downloadQt-68c915846e8820e008d15fb3453aa6f45d5becf4.zip
Qt-68c915846e8820e008d15fb3453aa6f45d5becf4.tar.gz
Qt-68c915846e8820e008d15fb3453aa6f45d5becf4.tar.bz2
Fix memory leak.
Diffstat (limited to 'src/declarative/fx/qfxrect.h')
-rw-r--r--src/declarative/fx/qfxrect.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/fx/qfxrect.h b/src/declarative/fx/qfxrect.h
index 2c59914..864b1cd 100644
--- a/src/declarative/fx/qfxrect.h
+++ b/src/declarative/fx/qfxrect.h
@@ -109,7 +109,8 @@ class Q_DECLARATIVE_EXPORT QFxGradient : public QObject
Q_CLASSINFO("DefaultProperty", "stops")
public:
- QFxGradient(QObject *parent=0) : QObject(parent), m_gradient(0), m_created(false) {}
+ QFxGradient(QObject *parent=0) : QObject(parent), m_gradient(0) {}
+ ~QFxGradient() { delete m_gradient; }
QList<QFxGradientStop *> *stops() { return &m_stops; }
@@ -118,7 +119,6 @@ public:
private:
QList<QFxGradientStop *> m_stops;
mutable QGradient *m_gradient;
- mutable bool m_created;
};
QML_DECLARE_TYPE(QFxGradient)