diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-05 06:58:20 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-05 06:58:20 (GMT) |
commit | e6a682189c4cd7f291648b9190b68cce79106b86 (patch) | |
tree | d3a904ca42678958df52f0962f01c57b80c0c448 /src/declarative/graphicsitems/qmlgraphicslistview.cpp | |
parent | e1f01000ec127dd5a949eabf9b436f649597bf01 (diff) | |
download | Qt-e6a682189c4cd7f291648b9190b68cce79106b86.zip Qt-e6a682189c4cd7f291648b9190b68cce79106b86.tar.gz Qt-e6a682189c4cd7f291648b9190b68cce79106b86.tar.bz2 |
Add test for GridView, and fix bug.
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicslistview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index fc1ec4a..f9d4190 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -662,19 +662,16 @@ void QmlGraphicsListViewPrivate::createHighlight() if (nobj) { highlightContext->setParent(nobj); item = qobject_cast<QmlGraphicsItem *>(nobj); - if (!item) { + if (!item) delete nobj; - } else { - item->setParent(q->viewport()); - } } else { delete highlightContext; } } else { item = new QmlGraphicsItem; - item->setParent(q->viewport()); } if (item) { + item->setParent(q->viewport()); item->setZValue(0); highlight = new FxListItem(item, q); if (orient == QmlGraphicsListView::Vertical) |