tst_QGraphicsLinearLayout: remove dead code (dump())

This test function hasn't tested anything since the start of the
public history, and leaks memory (the QGraphicsWidgets).

The dump() function, while implemented, doesn't do anything by default
(#ifdef'ed out), so there's no point in adding actual dump() calls
here, either.

Remove this function as dead code.

Amends the start of the public history.

Pick-to: 6.8 6.5 5.15
Change-Id: I6d9d224945fab0f97db0c5ea7d13a7df6c8837b2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 891473270869a29a6efb09962cf4cb19cc4d8d9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2025-03-27 21:06:49 +01:00 committed by Qt Cherry-pick Bot
parent ceefdd6044
commit fcf12e50c9

View File

@ -26,8 +26,6 @@ private slots:
void alignment();
void count_data();
void count();
void dump_data();
void dump();
void geometry_data();
void geometry();
void insertItem_data();
@ -373,31 +371,6 @@ void tst_QGraphicsLinearLayout::count()
// see also removeAt()
}
void tst_QGraphicsLinearLayout::dump_data()
{
QTest::addColumn<int>("itemCount");
QTest::addColumn<int>("layoutCount");
for (int i = -1; i < 3; ++i) {
const QByteArray iB = QByteArray::number(i);
QTest::newRow((iB + ", 0, 0").constData()) << 0 << 0;
QTest::newRow((iB + ", 0, 5").constData()) << 5 << 5;
QTest::newRow((iB + ", 5, 0").constData()) << 5 << 5;
QTest::newRow((iB + ", 5, 5").constData()) << 5 << 5;
}
}
// void dump(int indent = 0) const public
void tst_QGraphicsLinearLayout::dump()
{
QFETCH(int, itemCount);
QFETCH(int, layoutCount);
SubQGraphicsLinearLayout layout;
for (int i = 0; i < itemCount; ++i)
layout.addItem(new QGraphicsWidget);
for (int i = 0; i < layoutCount; ++i)
layout.addItem(new SubQGraphicsLinearLayout);
}
void tst_QGraphicsLinearLayout::geometry_data()
{
QTest::addColumn<int>("itemCount");