summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-08-25 22:56:24 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-08-25 22:56:24 (GMT)
commit4bc81bb1cb3cd4a0a3fe071e00556124e770d7ac (patch)
tree1ccd5f24b1501db64c978e5b2ad2f140defd7837 /src
parent141c5ea5b14b1499bcfb5e2c39c917e94aa4e23f (diff)
downloadQt-4bc81bb1cb3cd4a0a3fe071e00556124e770d7ac.zip
Qt-4bc81bb1cb3cd4a0a3fe071e00556124e770d7ac.tar.gz
Qt-4bc81bb1cb3cd4a0a3fe071e00556124e770d7ac.tar.bz2
Handle QAbstractItemModel layoutChanged() signal
Treated identically to reset. Task-number: QTBUG-13146
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 65b14cf..c6b8514 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -714,6 +714,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::disconnect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_modelReset()));
d->m_abstractItemModel = 0;
} else if (d->m_visualItemModel) {
QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
@@ -761,6 +762,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_modelReset()));
d->m_metaDataCacheable = true;
return;
}