diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-08-24 11:07:09 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-08-24 11:09:22 (GMT) |
commit | 189a18eddfa7504a604060172a394bda60aeba10 (patch) | |
tree | 81be3812955aa60665a693c1abbdf0a30fbbd5e7 /tests/auto/gestures | |
parent | 9a468f59472e8978aa18b75e9786718a8823bbec (diff) | |
download | Qt-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.cpp | 5 |
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; |