summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxlistview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 5f1defd..268ced1 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -439,10 +439,6 @@ void QFxListViewPrivate::releaseItem(FxListItem *item)
Q_Q(QFxListView);
if (!item)
return;
- if (orient == Qt::Vertical)
- QObject::disconnect(item->item, SIGNAL(heightChanged()), q, SLOT(itemResized()));
- else
- QObject::disconnect(item->item, SIGNAL(widthChanged()), q, SLOT(itemResized()));
if (trackedItem == item) {
const char *notifier1 = orient == Qt::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
const char *notifier2 = orient == Qt::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
@@ -453,6 +449,10 @@ void QFxListViewPrivate::releaseItem(FxListItem *item)
if (model->release(item->item) == 0) {
// item was not destroyed, and we no longer reference it.
unrequestedItems.insert(item->item, model->indexOf(item->item, q));
+ if (orient == Qt::Vertical)
+ QObject::disconnect(item->item, SIGNAL(heightChanged()), q, SLOT(itemResized()));
+ else
+ QObject::disconnect(item->item, SIGNAL(widthChanged()), q, SLOT(itemResized()));
}
delete item;
}