summaryrefslogtreecommitdiffstats
path: root/tests/auto/gestures
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-08-24 11:07:09 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-08-24 11:09:22 (GMT)
commit189a18eddfa7504a604060172a394bda60aeba10 (patch)
tree81be3812955aa60665a693c1abbdf0a30fbbd5e7 /tests/auto/gestures
parent9a468f59472e8978aa18b75e9786718a8823bbec (diff)
downloadQt-189a18eddfa7504a604060172a394bda60aeba10.zip
Qt-189a18eddfa7504a604060172a394bda60aeba10.tar.gz
Qt-189a18eddfa7504a604060172a394bda60aeba10.tar.bz2
Fixed delivering gestures to a toplevel widget.
If there is only one widget which is a toplevel, then gestures were not delivered to it because we assumed (wrong) that there is at least one child widget. Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'tests/auto/gestures')
-rw-r--r--tests/auto/gestures/tst_gestures.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index a968520..ddc3939 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -395,7 +395,12 @@ void tst_Gestures::customGesture()
{
GestureWidget widget;
widget.grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
+ widget.show();
+ QTest::qWaitForWindowShown(&widget);
+
CustomEvent event;
+ event.hotSpot = widget.mapToGlobal(QPoint(5,5));
+ event.hasHotSpot = true;
sendCustomGesture(&event, &widget);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;