Commit c5a71b1b authored by David Redondo's avatar David Redondo 🏎
Browse files

Do not leak the created QQuickItems

The items returned by beginCreate() are owned by us.


(cherry picked from commit 8cd7d7f6)
parent 52f15a73
......@@ -311,6 +311,7 @@ SensorFace *SensorFaceControllerPrivate::createGui(const QString &qmlPath)
context->setParent(gui);
gui->setController(q);
gui->setParent(q);
component->completeCreate();
......@@ -338,6 +339,7 @@ QQuickItem *SensorFaceControllerPrivate::createConfigUi(const QString &file, con
QQuickItem *gui = qobject_cast<QQuickItem *>(guiObject);
Q_ASSERT(gui);
context->setParent(gui);
gui->setParent(q);
component->deleteLater();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment