summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtouchevent
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-08 12:44:39 +0200
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-08 12:44:39 +0200
commit52d9ce4ac87c6be1cdc9106ce359e58f7d791c00 (patch)
tree4780ed879bf356d46bd707f46d56f1b0df3c97c8 /tests/auto/qtouchevent
parentbe15f967163a0e92e517920278b648c2ffc25eb9 (diff)
test that TouchBegin events propagate through widgets with Qt::WA_AcceptTouchEvents
Diffstat (limited to 'tests/auto/qtouchevent')
-rw-r--r--tests/auto/qtouchevent/tst_qtouchevent.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qtouchevent/tst_qtouchevent.cpp b/tests/auto/qtouchevent/tst_qtouchevent.cpp
index 1550935a73..7a38d2474a 100644
--- a/tests/auto/qtouchevent/tst_qtouchevent.cpp
+++ b/tests/auto/qtouchevent/tst_qtouchevent.cpp
@@ -172,6 +172,21 @@ void tst_QTouchEvent::touchBeginPropagatesWhenIgnored()
QVERIFY(grandchild.seenTouchBegin);
QVERIFY(child.seenTouchBegin);
QVERIFY(!window.seenTouchBegin);
+
+ // disable touch on grandchild. even though it doesn't accept it, child should still get the
+ // TouchBegin
+ grandchild.reset();
+ child.reset();
+ window.reset();
+ grandchild.setAttribute(Qt::WA_AcceptTouchEvents, false);
+
+ touchEvent.ignore();
+ res = QApplication::sendEvent(&grandchild, &touchEvent);
+ QVERIFY(res);
+ QVERIFY(touchEvent.isAccepted());
+ QVERIFY(!grandchild.seenTouchBegin);
+ QVERIFY(child.seenTouchBegin);
+ QVERIFY(!window.seenTouchBegin);
}
void tst_QTouchEvent::touchUpdateAndEndNeverPropagate()