diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-11-16 08:25:06 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-11-16 08:27:56 (GMT) |
commit | 07b9a2f2f74a42c83ac95f144392437001a455bb (patch) | |
tree | acdd8c136a663212de6f44b40e31ac7188cd9bb6 /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | |
parent | 0aba1250db9ac414fbe4b0fed9fcba713bf5a619 (diff) | |
download | Qt-07b9a2f2f74a42c83ac95f144392437001a455bb.zip Qt-07b9a2f2f74a42c83ac95f144392437001a455bb.tar.gz Qt-07b9a2f2f74a42c83ac95f144392437001a455bb.tar.bz2 |
Fix regression due to 6cf397f7ac35a058096528a7ad8bfaf623b30747
PathView needed to update internal item count when delegate was set.
VDM::count() didn't call into the internal VDM when querying count.
Task-number: QTBUG-14781
Reviewed-by: Alan Alpert
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); |