diff options
author | David Boddie <david.boddie@nokia.com> | 2010-11-19 19:35:00 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-11-19 19:35:00 (GMT) |
commit | ca1fcd8e9cbedab190efdb456f78e5f604293b3b (patch) | |
tree | 1294122bd5a8e1ae802d37d107594584444e0aab /src/declarative/graphicsitems | |
parent | 9743d1ae8dcec6b64bf497e76bd49a029c8f3ecc (diff) | |
parent | 3bfaf7740d527f88b5910f16abdd0e71977a8a5b (diff) | |
download | Qt-ca1fcd8e9cbedab190efdb456f78e5f604293b3b.zip Qt-ca1fcd8e9cbedab190efdb456f78e5f604293b3b.tar.gz Qt-ca1fcd8e9cbedab190efdb456f78e5f604293b3b.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 926bec2..7c79afe 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -537,7 +537,6 @@ int QDeclarativePathView::count() const /*! \qmlproperty Path PathView::path - \default This property holds the path used to lay out the items. For more information see the \l Path documentation. */ @@ -1012,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 1f01a45..4fe6c4c 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -937,6 +937,10 @@ 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(); } |