summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qtouchevent/touchwidget.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/qtouchevent/touchwidget.cpp b/tests/manual/qtouchevent/touchwidget.cpp
index 0516c5b..f029f8b 100644
--- a/tests/manual/qtouchevent/touchwidget.cpp
+++ b/tests/manual/qtouchevent/touchwidget.cpp
@@ -31,7 +31,7 @@ bool TouchWidget::event(QEvent *event)
{
switch (event->type()) {
case QEvent::TouchBegin:
- seenTouchBegin = true;
+ seenTouchBegin = !seenTouchBegin && !seenTouchUpdate && !seenTouchEnd;
touchPointCount = qMax(touchPointCount, static_cast<QTouchEvent *>(event)->touchPoints().count());
if (acceptTouchBegin) {
event->accept();
@@ -39,7 +39,7 @@ bool TouchWidget::event(QEvent *event)
}
break;
case QEvent::TouchUpdate:
- seenTouchUpdate = true;
+ seenTouchUpdate = seenTouchBegin && !seenTouchEnd;
touchPointCount = qMax(touchPointCount, static_cast<QTouchEvent *>(event)->touchPoints().count());
if (acceptTouchUpdate) {
event->accept();
@@ -47,7 +47,7 @@ bool TouchWidget::event(QEvent *event)
}
break;
case QEvent::TouchEnd:
- seenTouchEnd = true;
+ seenTouchEnd = seenTouchBegin && !seenTouchEnd;
touchPointCount = qMax(touchPointCount, static_cast<QTouchEvent *>(event)->touchPoints().count());
if (closeWindowOnTouchEnd)
window()->close();