From d3462ee56bf689b40738cdf5e9a3b378e9996d4e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 23 May 2025 13:50:38 +0800 Subject: internal: fix memory leaks --- modules/drawers/Drawers.qml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'modules/drawers') diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 184d464..d64cb15 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -35,12 +35,7 @@ Variants { height: scope.modelData.height - BorderConfig.thickness * 2 intersection: Intersection.Xor - regions: panels.children.map(c => regionComp.createObject(this, { - x: c.x, - y: c.y, - width: c.width, - height: c.height - })) + regions: regions.instances } anchors.top: true @@ -48,10 +43,18 @@ Variants { anchors.left: true anchors.right: true - Component { - id: regionComp + Variants { + id: regions + + model: panels.children Region { + required property Item modelData + + x: modelData.x + y: modelData.y + width: modelData.width + height: modelData.height intersection: Intersection.Subtract } } -- cgit v1.2.3-freya