From e8b7e4e96a23b87011abeb1e4f5f694654866e3f Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Fri, 5 Mar 2021 17:59:00 +0100 Subject: QObject: remove QAbstractDeclarativeData::parentChanged The code in qtdeclarative did not do anything at all anymore. Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073 Reviewed-by: Lars Knoll Reviewed-by: Qt CI Bot --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 37 ----------------------- 1 file changed, 37 deletions(-) (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp') diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index a7b47438e0..e143aeed6d 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -154,7 +154,6 @@ private slots: void qmlConnect(); void qmlConnectToQObjectReceiver(); void exceptions(); - void noDeclarativeParentChangedOnDestruction(); void deleteLaterInAboutToBlockHandler(); void mutableFunctor(); void checkArgumentsForNarrowing(); @@ -6993,42 +6992,6 @@ void tst_QObject::exceptions() #endif } -#ifdef QT_BUILD_INTERNAL -static bool parentChangeCalled = false; - -static void testParentChanged(QAbstractDeclarativeData *, QObject *, QObject *) -{ - parentChangeCalled = true; -} -#endif - -void tst_QObject::noDeclarativeParentChangedOnDestruction() -{ -#ifdef QT_BUILD_INTERNAL - typedef void (*ParentChangedCallback)(QAbstractDeclarativeData *, QObject *, QObject *); - QScopedValueRollback rollback(QAbstractDeclarativeData::parentChanged); - QAbstractDeclarativeData::parentChanged = testParentChanged; - - QObject *parent = new QObject; - QObject *child = new QObject; - - QAbstractDeclarativeData dummy; - QObjectPrivate::get(child)->declarativeData = &dummy; - - parentChangeCalled = false; - child->setParent(parent); - - QVERIFY(parentChangeCalled); - parentChangeCalled = false; - - delete child; - QVERIFY(!parentChangeCalled); - - delete parent; -#else - QSKIP("Needs QT_BUILD_INTERNAL"); -#endif -} struct MutableFunctor { int count; -- cgit v1.2.3