tst_QGraphicsGridLayout: remove unneeded delete in rowMaximumHeight()

The deleted 'widget' was added to a stack-allocated QGraphicsScene,
which owns it and will delete it as its child if it itself is deleted.

There's no check following the manual delete, and the test function's
name shows no indication that deleting graphics-widgets from a scene
in a show()n QGraphicsView is being tested here, so it serves no
purpose.

Remove it.

Amends the start of the public history.

Pick-to: 6.8 6.5 5.15
Change-Id: I4e5405cd6212d2a318a567d99ef42c99261d431a
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fc89096bcb28036cd12c0aaa690f3607e96f5e3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2025-04-02 21:16:29 +02:00 committed by Qt Cherry-pick Bot
parent 3295e7d52b
commit adbbd47314

View File

@ -1259,8 +1259,6 @@ void tst_QGraphicsGridLayout::rowMaximumHeight()
QCOMPARE(layout->itemAt(1,1)->geometry().height(), 25.0);
QCOMPARE(layout->itemAt(2,0)->geometry().height(), 25.0);
QCOMPARE(layout->itemAt(2,1)->geometry().height(), 25.0);
delete widget;
}
void tst_QGraphicsGridLayout::rowMinimumHeight_data()