Do not leak toolbox items

Finally found the cause of the items QML_LEAK_CHECK warns of.

BUG:336561
REVIEW: 119343
This commit is contained in:
David Edmundson 2014-07-17 18:11:38 +02:00
parent 31c1fcc50e
commit 5e9fc425c6

View File

@ -123,6 +123,7 @@ void ContainmentInterface::init()
QObject *toolBoxObject = qmlObject()->createObjectFromSource(QUrl::fromLocalFile(pkg.filePath("mainscript")), 0, toolboxProperties);
if (toolBoxObject && containmentGraphicObject) {
containmentGraphicObject->setProperty("toolBox", QVariant::fromValue(toolBoxObject));
toolBoxObject->setParent(containmentGraphicObject);
}
} else {
qWarning() << "Could not load toolbox package." << pkg.path();