The test function created a parent-less QGraphicsWidget on the heap, and didn't otherwise transfer ownership of it to another object, so the object was leaked. The minimal fix is to hold the graphics-widget in a unique_ptr. This requires to change the following line, too (as would the alternative, allocation on the stack), but the rest of the function can stay as-is (unlike with stack allocation, which would require further s/[.]/->/. Amends 4f072e2d3d7e429359ff15a615d02712bff7ee51. Pick-to: 6.8 6.5 5.15 Change-Id: Ide305dde7934747dbc3acdb49f5a75e98563828c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 45f317fba09e98c1fb5f0456ce6309d59d1161cc) 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%