summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-03-05 17:59:00 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-03-11 14:53:26 +0100
commite8b7e4e96a23b87011abeb1e4f5f694654866e3f (patch)
tree331f02af4293dc439b98ebd6d167578c084c552c /tests/auto/corelib/kernel/qobject/tst_qobject.cpp
parentd76c0e3224e5945e68f5e41b5346aed48e70850b (diff)
QObject: remove QAbstractDeclarativeData::parentChanged
The code in qtdeclarative did not do anything at all anymore. Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp')
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp37
1 files changed, 0 insertions, 37 deletions
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<ParentChangedCallback> 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;