void QSGGridView::itemsInserted(int modelIndex, int count)
{
Q_D(QSGGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
int index = d->visibleItems.count() ? d->mapFromModel(modelIndex) : 0;
void QSGGridView::itemsRemoved(int modelIndex, int count)
{
Q_D(QSGGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->itemCount -= count;
void QSGGridView::itemsMoved(int from, int to, int count)
{
Q_D(QSGGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->isValid())
return;
d->updateUnrequestedIndexes();
void QSGListView::itemsInserted(int modelIndex, int count)
{
Q_D(QSGListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->updateUnrequestedIndexes();
d->moveReason = QSGListViewPrivate::Other;
void QSGListView::itemsRemoved(int modelIndex, int count)
{
Q_D(QSGListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->moveReason = QSGListViewPrivate::Other;
d->updateUnrequestedIndexes();
void QSGListView::itemsMoved(int from, int to, int count)
{
Q_D(QSGListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->isValid())
return;
d->updateUnrequestedIndexes();
void QDeclarative1GridView::itemsInserted(int modelIndex, int count)
{
Q_D(QDeclarative1GridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
int index = d->visibleItems.count() ? d->mapFromModel(modelIndex) : 0;
void QDeclarative1GridView::itemsRemoved(int modelIndex, int count)
{
Q_D(QDeclarative1GridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->itemCount -= count;
void QDeclarative1GridView::itemsMoved(int from, int to, int count)
{
Q_D(QDeclarative1GridView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->isValid())
return;
QHash<int,FxGridItem1*> moved;
void QDeclarative1ListView::itemsInserted(int modelIndex, int count)
{
Q_D(QDeclarative1ListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->updateUnrequestedIndexes();
d->moveReason = QDeclarative1ListViewPrivate::Other;
void QDeclarative1ListView::itemsRemoved(int modelIndex, int count)
{
Q_D(QDeclarative1ListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->model || !d->model->isValid())
return;
d->moveReason = QDeclarative1ListViewPrivate::Other;
d->updateUnrequestedIndexes();
void QDeclarative1ListView::itemsMoved(int from, int to, int count)
{
Q_D(QDeclarative1ListView);
- if (!isComponentComplete())
+ if (!isComponentComplete() || !d->isValid())
return;
d->updateUnrequestedIndexes();