tst_QPointer: make DerivedParent delete all children

... not just 'derivedChild'.

This doesn't change anything for the test right now, but will enable
an extended test to be added on top.

Pick-to: 6.9 6.8 6.5 5.15
Change-Id: Id52f785168c97c43433fb15a6a71a9d1fb140036
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2025-04-04 14:28:52 +02:00
parent 2e0988190f
commit 4c610300e3

View File

@ -3,6 +3,8 @@
#include <QTest>
#include <QtTest/private/qcomparisontesthelper_p.h>
#include <QtCore/private/qobject_p.h>
#include <QRunnable>
#include <QThreadPool>
@ -383,7 +385,7 @@ DerivedParent::DerivedParent()
DerivedParent::~DerivedParent()
{
delete derivedChild;
QObjectPrivate::get(this)->deleteChildren(); // like ~QWidget() does
}
DerivedChild::~DerivedChild()