Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
4.7.0
Description
void QDeclarativeGridView::itemsInserted(int modelIndex, int count) maintains list of grid items QList<FxGridItem*> added; void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer) called from setCurrentIndex(0), ... may remove an item under certain circumstances (visibleItems.removeLast(). In consequence access to the already destroyed instance is performed. Consider drop the QList<FxGridItem*> added; in the void QDeclarativeGridView::itemsInserted(int modelIndex, int count) and following modification at the same time
// everything is in order now - emit add() signal
//for (int j = 0; j < added.count(); ++j)
// added.at(j)>attached>emitAdd(); //There is a problem
for (int j = 0; j < d->visibleItems.count(); ++j)
d->visibleItems.at(j)>attached>emitAdd();