Marc Mutz 4fe022c408 tst_QGraphicsGridLayout: fix memory leaks in columnCount()
The populateLayout() function adds parent-less QGraphicsWidgets
(RectItems) to the layout. If the layout had a graphics-widget parent,
it would reparent the items added to it onto the parent. But it
didn't, so it didn't.

Therefore, the last part of the test function (as denoted by the
re-creation of `layout`) leaked a lot of items, including `layout`.

To fix, give the layout the existing graphics-widget parent. Then the
layout itself isn't leaked anymore, either.

Amends the start of the public history.

Essentially the same commit for columnCount() that
b9836518a367a31a48027a5bf81c4973b847b442 was for rowCount().

Pick-to: 6.8 6.5 5.15
Change-Id: Ic38dfccfa41049d96eb0cf5811271ac17f2b1f91
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit d21434d1876fc778aa5dea6696b145bd6d86d03c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2025-04-12 07:45:25 +00:00
2025-03-24 18:27:25 +00:00
2024-11-05 14:36:16 +01:00
2015-08-18 19:59:14 +00: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%