Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
955daf47a350ad9eb84b30f50431482b16ecf22f
Description
tst_QDeclarativePathView::pathChanges gives (spurious?) warnings from delegates while changing the path. This seems to be because we complete the item while the model is in an interim state. The warning goes away (but I've no idea what else breaks) with this patch:
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1102,7 +1102,6 @@ void QDeclarativePathView::refill() // qDebug() << "append" << idx; QDeclarativeItem *item = d->getItem(idx); item->setZValue(idx+1); - d->model->completeItem(); if (d->currentIndex == idx) { item->setFocus(true); if (QDeclarativePathViewAttached *att = d->attached(item)) @@ -1119,6 +1118,7 @@ void QDeclarativePathView::refill() if (idx >= d->model->count()) idx = 0; pos = d->positionOfIndex(idx); + d->model->completeItem(); } idx = d->firstIndex - 1;