summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-16 15:27:45 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-09-16 15:27:45 +0200
commitc95b119596c17d8430b24d5e10c4f48fd0a88cb1 (patch)
tree6afae4fc1d2acc48e1d3715b8b80b9e8347ded20 /src/declarative/graphicsitems/qdeclarativegridview.cpp
parent7e729ca887f6e106f41acfc9f2081c31b446d114 (diff)
parentf09b12cea1143f1b2763064bb0d3e6592081de2b (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts: .qmake.conf Change-Id: I842b005b9818c9e201a09d51bcf418e2dd0a1ef9
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativegridview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index c3e27e74..14e77ec6 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -2759,8 +2759,10 @@ void QDeclarativeGridView::trackedPositionChanged()
void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
{
Q_D(QDeclarativeGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete()) {
+ emit countChanged();
return;
+ }
int index = d->visibleItems.count() ? d->mapFromModel(modelIndex) : 0;
if (index < 0) {
@@ -2895,8 +2897,10 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
void QDeclarativeGridView::itemsRemoved(int modelIndex, int count)
{
Q_D(QDeclarativeGridView);
- if (!isComponentComplete())
+ if (!isComponentComplete()) {
+ emit countChanged();
return;
+ }
d->itemCount -= count;
bool currentRemoved = d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count;