summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativelistview.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-02-22 23:55:24 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-02-23 00:10:08 (GMT)
commitf93d1245e5c36cf25cd6fd3c3418ee7e63e04ac2 (patch)
tree028b525e7d77580edd8dffe4cda33ba418fa0710 /src/declarative/graphicsitems/qdeclarativelistview.cpp
parentbf9ca539dc4c5efff801856ad9d3f7e14dabad26 (diff)
downloadQt-f93d1245e5c36cf25cd6fd3c3418ee7e63e04ac2.zip
Qt-f93d1245e5c36cf25cd6fd3c3418ee7e63e04ac2.tar.gz
Qt-f93d1245e5c36cf25cd6fd3c3418ee7e63e04ac2.tar.bz2
ListView and GridView indexAt should use qreal coordinates.
Change-Id: Ibe6969b5c3209062213c6582eaf4c285bcb793de Task-number: QTBUG-17594 Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativelistview.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index a60a4aa..91de5a6 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -148,7 +148,7 @@ public:
else
item->setWidth(size);
}
- bool contains(int x, int y) const {
+ bool contains(qreal x, qreal y) const {
return (x >= item->x() && x < item->x() + item->width() &&
y >= item->y() && y < item->y() + item->height());
}
@@ -2732,7 +2732,7 @@ void QDeclarativeListView::positionViewAtEnd()
\bold Note: methods should only be called after the Component has completed.
*/
-int QDeclarativeListView::indexAt(int x, int y) const
+int QDeclarativeListView::indexAt(qreal x, qreal y) const
{
Q_D(const QDeclarativeListView);
for (int i = 0; i < d->visibleItems.count(); ++i) {