summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-22 03:57:46 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-26 07:05:40 (GMT)
commitcae1bb9909e1cdb6963b29f4a93b03aa81c50880 (patch)
treeddf906267ca90bcf8e3d6cda40170eca96e6ede9 /tests
parent6ae73e7d73b29c4ccfb62a9b2bcf42404c96948f (diff)
downloadQt-cae1bb9909e1cdb6963b29f4a93b03aa81c50880.zip
Qt-cae1bb9909e1cdb6963b29f4a93b03aa81c50880.tar.gz
Qt-cae1bb9909e1cdb6963b29f4a93b03aa81c50880.tar.bz2
Allow MouseArea dragging to filter mouse events from descendants
This allows dragging a MouseArea that contains a clickable MouseArea, for example. Task-number: QTBUG-12323 Reviewed-by: Michael Brasser (cherry picked from commit 5dd0dfcd7a079065f99c6149c15b58e69f302729)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index 5a10372..c9bb467 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -137,6 +137,17 @@ void tst_QDeclarativeMouseArea::dragProperties()
QCOMPARE(yminSpy.count(),1);
QCOMPARE(ymaxSpy.count(),1);
+ // filterChildren
+ QSignalSpy filterChildrenSpy(drag, SIGNAL(filterChildrenChanged()));
+
+ drag->setFilterChildren(true);
+
+ QVERIFY(drag->filterChildren());
+ QCOMPARE(filterChildrenSpy.count(), 1);
+
+ drag->setFilterChildren(true);
+ QCOMPARE(filterChildrenSpy.count(), 1);
+
delete canvas;
}