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