summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-11-19 10:06:55 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-19 10:10:24 (GMT)
commit83525ca84ba7adadaeeb65ffa55a6d0f2630caaa (patch)
tree83a26fc42ba3811baf38776d266d4bf600684715 /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
parentb115770cc3bba68740a6848c7ccaed932399aca9 (diff)
parent4082e4711a1c54947429b15504caf778c6da22d0 (diff)
downloadQt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.zip
Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.gz
Qt-83525ca84ba7adadaeeb65ffa55a6d0f2630caaa.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/gui/kernel/qgesturemanager.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf Changes in qmake/generators/win32/msvc_objectmodel.cpp come from commit 4ba3dadcae97bfde6216c32cfa339f8f0e0253c7
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp4
1 files changed, 4 insertions, 0 deletions
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();
}