summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2011-05-19 12:15:26 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2011-05-19 12:15:26 (GMT)
commit37c4cd4801106112b638ed9d2164b87bbc0a0d1e (patch)
tree3dcc9e1b9908328d1355f5746fd77de7030b547f /src/declarative/graphicsitems/qdeclarativegridview.cpp
parentb6a6953d21a95c402e8a5010c1ea5131509eeea3 (diff)
parent35b5f15c3fe5c2f1f0d046d09b9d95dee3bb91b5 (diff)
downloadQt-37c4cd4801106112b638ed9d2164b87bbc0a0d1e.zip
Qt-37c4cd4801106112b638ed9d2164b87bbc0a0d1e.tar.gz
Qt-37c4cd4801106112b638ed9d2164b87bbc0a0d1e.tar.bz2
Merge branch '4.8-upstream'
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index f30831d..a3395a4 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1499,6 +1499,7 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
d->ownModel = true;
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model)) {
+ int oldCount = dataModel->count();
dataModel->setDelegate(delegate);
if (isComponentComplete()) {
for (int i = 0; i < d->visibleItems.count(); ++i)
@@ -1516,6 +1517,8 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
}
+ if (oldCount != dataModel->count())
+ emit countChanged();
emit delegateChanged();
}
}