Marc Mutz a6f082df9b tst_QGraphicsGridLayout: fix memleaks in addItem()
Both `layout` and `wid` were created without parents, and not otherwise added to
objects that would take their ownership; only `layout` was explicitly deleted
at the end of the function, `wid` was leaked.

The usual solution, giving them a stack-allocated graphics-widget as
parent that will delete them, doesn't work here, because the layout
does refuse to add the widget in some test rows.

Since there are no checks in-between the allocation and de-allocation
(this test is only checking for expected warning messages), do the
minimal fix and explicitly delete `wid`, as it was already done for
`layout`.

Amends the start of the public history.

Pick-to: 6.8 6.5 5.15
Change-Id: I5c7356ac93c04d648eb31888105b480791fbe155
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b518a385ad03c3b199f4704088d688b9bf1f3cc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-04-12 07:45:24 +00:00
2025-03-24 18:27:25 +00:00
2024-11-05 14:36:16 +01:00
2024-11-05 14:36:16 +01:00
2025-03-25 08:40:27 +00:00
2024-06-25 11:44:00 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%