summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-11-16 08:46:00 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-11-16 08:46:00 (GMT)
commitc60fad515b36e122574dec0bcc90532b81ed0d8a (patch)
treef7b2ec943a8c6cc76c4e82b1d1b34397ed70ade4
parent742b9679cc9fe2d2183b383428642600425920eb (diff)
parent07b9a2f2f74a42c83ac95f144392437001a455bb (diff)
downloadQt-c60fad515b36e122574dec0bcc90532b81ed0d8a.zip
Qt-c60fad515b36e122574dec0bcc90532b81ed0d8a.tar.gz
Qt-c60fad515b36e122574dec0bcc90532b81ed0d8a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index e6eaa2f..7c79afe 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -1011,6 +1011,7 @@ void QDeclarativePathView::setDelegate(QDeclarativeComponent *delegate)
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
+ d->modelCount = dataModel->count();
d->regenerate();
emit delegateChanged();
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 9601db0..4fe6c4c 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -937,6 +937,8 @@ void QDeclarativeVisualDataModel::setPart(const QString &part)
int QDeclarativeVisualDataModel::count() const
{
Q_D(const QDeclarativeVisualDataModel);
+ if (d->m_visualItemModel)
+ return d->m_visualItemModel->count();
if (!d->m_delegate)
return 0;
return d->modelCount();