Revert "Setting parent on toolbox causes problems. Instead delete via connection"
This reverts commit c38e6a204e66a2fca2f9f0606475731b5c6bf0d1. This causes problems on the panel toolbox. We were already trying to set a parent; however as it's a property of a QQuickItem it only changes the visual parent; kdeclarative has a code path that if there's a visual parent to skip the memory management; bug is probably there instead.
This commit is contained in:
parent
c38e6a204e
commit
1f7951d873
@ -123,7 +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));
|
||||
connect(containmentGraphicObject, &QObject::destroyed, toolBoxObject, &QObject::deleteLater);
|
||||
toolBoxObject->setParent(containmentGraphicObject);
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Could not load toolbox package." << pkg.path();
|
||||
|
Loading…
x
Reference in New Issue
Block a user