summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-01 05:34:32 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-01 05:34:32 (GMT)
commit0484ce38416fd3906cc1165995ecb0db8dd6c308 (patch)
tree60065f90ace6443accfd39761d25355663622858 /src/declarative
parentb605570b93213b90554c3ca63982972e7e20d556 (diff)
downloadQt-0484ce38416fd3906cc1165995ecb0db8dd6c308.zip
Qt-0484ce38416fd3906cc1165995ecb0db8dd6c308.tar.gz
Qt-0484ce38416fd3906cc1165995ecb0db8dd6c308.tar.bz2
Don't leak objects.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index d06376a..4b98d1b 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -568,7 +568,7 @@ QScriptValue QmlEnginePrivate::qmlScriptObject(QObject* object,
QmlEngine* engine)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
- return scriptEngine->newObject(new QmlObjectScriptClass(engine), scriptEngine->newQObject(object));
+ return scriptEngine->newObject(engine->d_func()->objectClass, scriptEngine->newQObject(object, QScriptEngine::AutoOwnership));
}
/*!