aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicklistview_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-06-14 15:11:54 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-22 12:47:31 +0200
commit530b773dfcd2dddeb824cb2a2c7fe1778e5c7985 (patch)
tree6f129e793fb1faa095d19812eff9f2a3834a69c3 /src/quick/items/qquicklistview_p.h
parent9e686c502be0b68f39836f29027a58466cb517b7 (diff)
Fix crash when dragging items outside visible area.
If asynchronous item creation finishes while the content area of a ListView has been dragged full outside the visible area a full refill is triggered which can overwrite the requested index and potentially result in a single delegate item being assigned to multiple view items and later being doubly released. Only create the view item object in the createItem function to prevent this from happening. Secondly only reset the visible items if jumping outside the buffer range rather than just the fill range to prevent churn when the list only contains buffered items. Task-number: QTBUG-26232 Change-Id: I5bce845898ef5f699f34afc268594ef38e01d6a3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquicklistview_p.h')
-rw-r--r--src/quick/items/qquicklistview_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquicklistview_p.h b/src/quick/items/qquicklistview_p.h
index 9775951f02..6bdd4cb674 100644
--- a/src/quick/items/qquicklistview_p.h
+++ b/src/quick/items/qquicklistview_p.h
@@ -158,6 +158,7 @@ protected:
virtual void viewportMoved(Qt::Orientations orient);
virtual void keyPressEvent(QKeyEvent *);
virtual void geometryChanged(const QRectF &newGeometry,const QRectF &oldGeometry);
+ virtual void initItem(int index, QQuickItem *item);
protected Q_SLOTS:
void updateSections();