summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-02-20 16:00:05 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-21 09:01:01 +0100
commitb3ff342d327dc00d99281dca4fbfe6c4300aa6c6 (patch)
treebc833f6085928ae3a32ff74a5a1ea2bff5410745
parent5054bb49a88a8ab76f586f79b6ef62a9142e6c83 (diff)
Revert "QQuickItemView: do not set parent to nullptr upon destruction"v5.15.0-beta1
This reverts commit 5445fcac36d7122d533a2bdf0fcfe6206b7f3ff4. The original commit avoids a warning generated for a dubious use case and breaks controls2 in a non-trivial way as a side effect. We should rather live with the warning. Task-number: QTBUG-82368 Change-Id: I6197bb63036cb25ec3e88f549667519b8f3ff13a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/quick/items/qquickitemview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
index 3e3a2c262b..7fb392233e 100644
--- a/src/quick/items/qquickitemview.cpp
+++ b/src/quick/items/qquickitemview.cpp
@@ -2419,7 +2419,7 @@ void QQuickItemView::destroyingItem(QObject *object)
Q_D(QQuickItemView);
QQuickItem* item = qmlobject_cast<QQuickItem*>(object);
if (item) {
- QQuickItemPrivate::get(item)->setCulled(true);
+ item->setParentItem(nullptr);
d->unrequestedItems.remove(item);
}
}