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>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%