aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-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 3b07503f35..aa8fec7061 100644
--- a/src/declarative/items/qsgitem.cpp
+++ b/src/declarative/items/qsgitem.cpp
@@ -1879,13 +1879,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;
}