aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items/qsgitem.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-01 11:30:00 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-07-01 11:30:00 +1000
commitd09d7aec4c3f4db0c4d6a09c33aff863551a8369 (patch)
treec6252697e54e186f075e9ae7b3d55fb10382648a /src/declarative/items/qsgitem.cpp
parente2c67953cea0ba8ceec880d124c9e9c97ec55207 (diff)
parent3296449d5cd9491b56914a23a78d2f78982a6856 (diff)
Merge branch 'master' into v8-clean
Conflicts: src/declarative/qml/qdeclarativevme.cpp Change-Id: I0bbc12c06d40c70433730cb33c4e9b461520263f
Diffstat (limited to 'src/declarative/items/qsgitem.cpp')
-rw-r--r--src/declarative/items/qsgitem.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/items/qsgitem.cpp b/src/declarative/items/qsgitem.cpp
index e3da1bd8dc..53bebe00ba 100644
--- a/src/declarative/items/qsgitem.cpp
+++ b/src/declarative/items/qsgitem.cpp
@@ -1926,13 +1926,12 @@ QSGItem *QSGItem::childAt(qreal x, qreal y) const
// XXX todo - should this include transform etc.?
const QList<QSGItem *> children = childItems();
for (int i = children.count()-1; i >= 0; --i) {
- if (QSGItem *child = qobject_cast<QSGItem *>(children.at(i))) {
- if (child->isVisible() && child->x() <= x
+ QSGItem *child = children.at(i);
+ if (child->isVisible() && child->x() <= x
&& child->x() + child->width() >= x
&& child->y() <= y
&& child->y() + child->height() >= y)
- return child;
- }
+ return child;
}
return 0;
}