summaryrefslogtreecommitdiffstats
path: root/tests/auto/gestures/tst_gestures.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gestures/tst_gestures.cpp')
-rw-r--r--tests/auto/gestures/tst_gestures.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index eba2616..6acfe70 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -330,6 +330,7 @@ private slots:
void testMapToScene();
void ungrabGesture();
void consumeEventHint();
+ void unregisterRecognizer();
};
tst_Gestures::tst_Gestures()
@@ -1276,5 +1277,20 @@ void tst_Gestures::ungrabGesture() // a method on QWidget
QCOMPARE(a->gestureOverrideEventsReceived, 0);
}
+void tst_Gestures::unregisterRecognizer() // a method on QApplication
+{
+ /*
+ The hardest usecase to get right is when we remove a recognizer while several
+ of the gestures it created are in active state and we immediately add a new recognizer
+ for the same type (thus replacing the old one).
+ The expected result is that all old gestures continue till they are finished/cancelled
+ and the new recognizer starts creating gestures immediately at registration.
+
+ This implies that deleting of the recognizer happens only when there are no more gestures
+ that it created. (since gestures might have a pointer to the recognizer)
+ */
+
+}
+
QTEST_MAIN(tst_Gestures)
#include "tst_gestures.moc"