From e6c1248bef68c273ceb6306db1fa0a64d440e28e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:29:12 +1000 Subject: [PATCH] fix: no need to disconnect signal Signal will auto disconnect on item destruction --- plugin/src/Caelestia/Components/lazylistview.cpp | 5 +---- plugin/src/Caelestia/Components/lazylistview.hpp | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/src/Caelestia/Components/lazylistview.cpp b/plugin/src/Caelestia/Components/lazylistview.cpp index 94e37687..1df13123 100644 --- a/plugin/src/Caelestia/Components/lazylistview.cpp +++ b/plugin/src/Caelestia/Components/lazylistview.cpp @@ -674,8 +674,7 @@ LazyListView::DelegateEntry LazyListView::createDelegate(int modelIndex) { // Watch attached properties if the delegate uses them auto* attached = qobject_cast(qmlAttachedPropertiesObject(entry.item, false)); if (attached) { - entry.attachedConnection = - connect(attached, &LazyListViewAttached::preferredHeightChanged, this, onHeightChanged); + connect(attached, &LazyListViewAttached::preferredHeightChanged, this, onHeightChanged); connect(attached, &LazyListViewAttached::visibleHeightChanged, this, [this] { polish(); }); @@ -685,8 +684,6 @@ LazyListView::DelegateEntry LazyListView::createDelegate(int modelIndex) { } void LazyListView::destroyDelegate(DelegateEntry& entry) { - if (entry.attachedConnection) - disconnect(entry.attachedConnection); if (entry.item) { entry.item->setParentItem(nullptr); entry.item->setVisible(false); diff --git a/plugin/src/Caelestia/Components/lazylistview.hpp b/plugin/src/Caelestia/Components/lazylistview.hpp index 395d022e..0098fb03 100644 --- a/plugin/src/Caelestia/Components/lazylistview.hpp +++ b/plugin/src/Caelestia/Components/lazylistview.hpp @@ -164,7 +164,6 @@ private: int modelIndex = -1; QQuickItem* item = nullptr; bool pendingRemoval = false; - QMetaObject::Connection attachedConnection; }; // Layout