summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtouchevent
diff options
context:
space:
mode:
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 1550935..7a38d24 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()