summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-07-30 01:14:39 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-07-30 01:14:39 (GMT)
commit674291cc996a10210321b64ea80cf20d0cc678d4 (patch)
tree6636e68b2f315e39557a01b02fb4a027f15ccc92 /src
parent56805f1f4d001f83f888b01076b495798378a92c (diff)
downloadQt-674291cc996a10210321b64ea80cf20d0cc678d4.zip
Qt-674291cc996a10210321b64ea80cf20d0cc678d4.tar.gz
Qt-674291cc996a10210321b64ea80cf20d0cc678d4.tar.bz2
Don't disconnect item size connections if the item is referenced.
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;
}