aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgpathview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-05-30 16:35:52 +1000
committerMartin Jones <martin.jones@nokia.com>2011-05-30 16:35:52 +1000
commit16e75d93ebe652f6e5b919aa89809a92881a37e7 (patch)
tree3caee160c2913ceca306abdccc9ae3a82aae9d6d /src/declarative/items/qsgpathview.cpp
parent806f031efeda71d3f4d7d2f949b437493e79cf52 (diff)
Update SG items with recent GV item changes.
Diffstat (limited to 'src/declarative/items/qsgpathview.cpp')
-rw-r--r--src/declarative/items/qsgpathview.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/declarative/items/qsgpathview.cpp b/src/declarative/items/qsgpathview.cpp
index 87e550b630..fc3d39aef7 100644
--- a/src/declarative/items/qsgpathview.cpp
+++ b/src/declarative/items/qsgpathview.cpp
@@ -1,4 +1,4 @@
-// Commit: 8878e2c53a0c9408d4b468e2dad485743c32f58b
+// Commit: 806f031efeda71d3f4d7d2f949b437493e79cf52
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
@@ -205,7 +205,8 @@ void QSGPathViewPrivate::createHighlight()
bool changed = false;
if (highlightItem) {
- delete highlightItem;
+ highlightItem->setParentItem(0);
+ highlightItem->deleteLater();
highlightItem = 0;
changed = true;
}
@@ -717,9 +718,12 @@ void QSGPathView::setDelegate(QDeclarativeComponent *delegate)
d->ownModel = true;
}
if (QSGVisualDataModel *dataModel = qobject_cast<QSGVisualDataModel*>(d->model)) {
+ int oldCount = dataModel->count();
dataModel->setDelegate(delegate);
d->modelCount = dataModel->count();
d->regenerate();
+ if (oldCount != dataModel->count())
+ emit countChanged();
emit delegateChanged();
}
}