summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-09-07 01:32:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-09-07 01:32:37 (GMT)
commit16cdd82a88a63ea050ab2cf70368e023fe50c5bd (patch)
tree78daadbbfa00540dc5c271d847a001900400dc05 /src/declarative
parentba6778b080086ef1bb44059b4e871ad46405ce0e (diff)
parent60d4d9c0dcc62e579a96d3909e4c04fd9e8fd1d4 (diff)
downloadQt-16cdd82a88a63ea050ab2cf70368e023fe50c5bd.zip
Qt-16cdd82a88a63ea050ab2cf70368e023fe50c5bd.tar.gz
Qt-16cdd82a88a63ea050ab2cf70368e023fe50c5bd.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxgridview.cpp1
-rw-r--r--src/declarative/fx/qfxlistview.cpp1
-rw-r--r--src/declarative/fx/qfxpainteditem.cpp1
-rw-r--r--src/declarative/fx/qfxtextinput_p.h1
-rw-r--r--src/declarative/qml/qmlengine.cpp20
-rw-r--r--src/declarative/qml/qmlengine_p.h3
-rw-r--r--src/declarative/util/qmllistmodel.cpp1
7 files changed, 17 insertions, 11 deletions
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp
index 7279e2c..cccd7a6 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/fx/qfxgridview.cpp
@@ -699,6 +699,7 @@ QFxGridView::QFxGridView(QFxItem *parent)
QFxGridView::~QFxGridView()
{
Q_D(QFxGridView);
+ d->clear();
if (d->ownModel)
delete d->model;
}
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 523786f..c24610f 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -881,6 +881,7 @@ QFxListView::QFxListView(QFxItem *parent)
QFxListView::~QFxListView()
{
Q_D(QFxListView);
+ d->clear();
if (d->ownModel)
delete d->model;
}
diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp
index cbd00cf..5471e1b 100644
--- a/src/declarative/fx/qfxpainteditem.cpp
+++ b/src/declarative/fx/qfxpainteditem.cpp
@@ -175,6 +175,7 @@ QFxPaintedItem::QFxPaintedItem(QFxPaintedItemPrivate &dd, QFxItem *parent)
*/
QFxPaintedItem::~QFxPaintedItem()
{
+ clearCache();
}
/*!
diff --git a/src/declarative/fx/qfxtextinput_p.h b/src/declarative/fx/qfxtextinput_p.h
index 22a5306..b533854 100644
--- a/src/declarative/fx/qfxtextinput_p.h
+++ b/src/declarative/fx/qfxtextinput_p.h
@@ -72,6 +72,7 @@ public:
~QFxTextInputPrivate()
{
+ delete control;
}
void init();
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 3d8b2c4..6d3506c 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -144,6 +144,10 @@ QmlEnginePrivate::~QmlEnginePrivate()
contextClass = 0;
delete objectClass;
objectClass = 0;
+ delete valueTypeClass;
+ valueTypeClass = 0;
+ delete typeNameClass;
+ typeNameClass = 0;
delete networkAccessManager;
networkAccessManager = 0;
delete nodeListClass;
@@ -270,14 +274,10 @@ QmlEnginePrivate::queryContext(const QString &propName, uint *id,
return rv;
}
-QScriptValue
-QmlEnginePrivate::propertyContext(const QScriptString &name,
- QmlContext *bindContext,
- uint id)
+QScriptValue QmlEnginePrivate::propertyContext(const QScriptString &name, uint id)
{
Q_ASSERT(id == resolveData.safetyCheckId);
-
if (resolveData.type || resolveData.ns) {
QmlTypeNameBridge tnb = {
resolveData.object,
@@ -1092,11 +1092,10 @@ QScriptValue QmlContextScriptClass::property(const QScriptValue &object,
const QScriptString &name,
uint id)
{
- QmlContext *bindContext =
- static_cast<QmlContext*>(object.data().toQObject());
+ Q_UNUSED(object);
QmlEnginePrivate *ep = QmlEnginePrivate::get(engine);
- return ep->propertyContext(name, bindContext, id);
+ return ep->propertyContext(name, id);
}
void QmlContextScriptClass::setProperty(QScriptValue &object,
@@ -1104,6 +1103,7 @@ void QmlContextScriptClass::setProperty(QScriptValue &object,
uint id,
const QScriptValue &value)
{
+ Q_UNUSED(object);
Q_UNUSED(name);
QmlEnginePrivate::get(engine)->setPropertyContext(value, id);
@@ -1124,6 +1124,8 @@ QmlTypeNameScriptClass::queryProperty(const QScriptValue &scriptObject,
const QScriptString &name,
QueryFlags flags, uint *id)
{
+ Q_UNUSED(flags);
+
QmlTypeNameBridge bridge =
qvariant_cast<QmlTypeNameBridge>(scriptObject.data().toVariant());
@@ -1279,7 +1281,7 @@ QScriptValue QmlObjectToString(QScriptContext *context, QScriptEngine *engine)
ret += QLatin1String("\"");
ret += obj->objectName();
ret += QLatin1String("\" ");
- ret += obj->metaObject()->className();
+ ret += QLatin1String(obj->metaObject()->className());
ret += QLatin1String("(0x");
ret += QString::number((quintptr)obj,16);
ret += QLatin1String(")");
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h
index f492ccb..15ab40d 100644
--- a/src/declarative/qml/qmlengine_p.h
+++ b/src/declarative/qml/qmlengine_p.h
@@ -100,8 +100,7 @@ public:
QScriptClass::QueryFlags queryContext(const QString &name, uint *id,
QmlContext *);
- QScriptValue propertyContext(const QScriptString &propName, QmlContext *,
- uint id);
+ QScriptValue propertyContext(const QScriptString &propName, uint id);
void setPropertyContext(const QScriptValue &, uint id);
QScriptClass::QueryFlags queryObject(const QString &name, uint *id,
QObject *);
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 98c552f..0d9ea94 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -230,6 +230,7 @@ QmlListModel::QmlListModel(QObject *parent)
QmlListModel::~QmlListModel()
{
+ delete _root;
}
void QmlListModel::checkRoles() const