summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-08 01:10:47 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-08 01:10:47 (GMT)
commitfa2cd481324d65d754d77f4fb3a99cc394fdba78 (patch)
tree4da9c968361a7cc4f7f95efdc731a27b3630f5a4 /src/declarative
parent89e0ecfb4afe8b6f1d8cbfe64cfd493ad423919e (diff)
downloadQt-fa2cd481324d65d754d77f4fb3a99cc394fdba78.zip
Qt-fa2cd481324d65d754d77f4fb3a99cc394fdba78.tar.gz
Qt-fa2cd481324d65d754d77f4fb3a99cc394fdba78.tar.bz2
Fix leaks.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxpathview.cpp3
-rw-r--r--src/declarative/qml/qmlcompositetypemanager.cpp1
-rw-r--r--src/declarative/qml/qmlmetatype.cpp1
-rw-r--r--src/declarative/util/qfxview.cpp2
4 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp
index 469e9f3..62f9db0 100644
--- a/src/declarative/fx/qfxpathview.cpp
+++ b/src/declarative/fx/qfxpathview.cpp
@@ -128,6 +128,9 @@ QFxPathView::QFxPathView(QFxPathViewPrivate &dd, QFxItem *parent)
QFxPathView::~QFxPathView()
{
+ Q_D(QFxPathView);
+ if (d->ownModel)
+ delete d->model;
}
/*!
diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp
index bcfbcc8..a99cff0 100644
--- a/src/declarative/qml/qmlcompositetypemanager.cpp
+++ b/src/declarative/qml/qmlcompositetypemanager.cpp
@@ -87,6 +87,7 @@ QmlComponent *QmlCompositeTypeData::toComponent(QmlEngine *engine)
QmlCompiledData *cc = toCompiledComponent(engine);
if (cc) {
component = new QmlComponent(engine, cc, -1, -1, 0);
+ cc->release();
} else {
component = new QmlComponent(engine, 0);
component->d_func()->url = imports.baseUrl();
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index ac89d28..14d85ff 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -197,6 +197,7 @@ QmlType::QmlType(int type, int listType, int qmlListType,
QmlType::~QmlType()
{
+ delete d->m_customParser;
delete d;
}
diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp
index 9291e1a..2a38cda 100644
--- a/src/declarative/util/qfxview.cpp
+++ b/src/declarative/util/qfxview.cpp
@@ -222,7 +222,7 @@ void QFxView::execute()
if (d->qml.isEmpty()) {
d->component = new QmlComponent(&d->engine, d->source, this);
} else {
- d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source);
+ d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source, this);
}
if (!d->component->isLoading()) {