diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-23 11:04:19 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-10-26 10:42:32 (GMT) |
commit | 20cddedfe5f422eb0607a5ac85870267b2788117 (patch) | |
tree | 34de2cf74e4f1a6c353202f0182c41e9321c06db /tests/auto/gestures | |
parent | f3cbbd7b8388b4c7445a5fa56d59abdae6c532cb (diff) | |
download | Qt-20cddedfe5f422eb0607a5ac85870267b2788117.zip Qt-20cddedfe5f422eb0607a5ac85870267b2788117.tar.gz Qt-20cddedfe5f422eb0607a5ac85870267b2788117.tar.bz2 |
Unregister the temporary gesture recognizer in the gestures autotest.
Reviewed-by: trustme
Diffstat (limited to 'tests/auto/gestures')
-rw-r--r-- | tests/auto/gestures/tst_gestures.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index 92f979f..800af1b 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -341,6 +341,7 @@ void tst_Gestures::initTestCase() void tst_Gestures::cleanupTestCase() { + qApp->unregisterGestureRecognizer(CustomGesture::GestureType); } void tst_Gestures::init() @@ -547,6 +548,8 @@ void tst_Gestures::conflictingGestures() QCOMPARE(child->events.all.count(), TotalGestureEventsCount + ContinuousGestureEventsCount); QCOMPARE(parent.gestureOverrideEventsReceived, 0); QCOMPARE(parent.gestureEventsReceived, 0); + + qApp->unregisterGestureRecognizer(ContinuousGesture); } void tst_Gestures::finishedWithoutStarted() @@ -978,6 +981,8 @@ void tst_Gestures::twoGesturesOnDifferentLevel() QCOMPARE(parent.events.all.size(), TotalGestureEventsCount); for(int i = 0; i < child->events.all.size(); ++i) QCOMPARE(parent.events.all.at(i), CustomGesture::GestureType); + + qApp->unregisterGestureRecognizer(SecondGesture); } void tst_Gestures::multipleGesturesInTree() @@ -1046,6 +1051,9 @@ void tst_Gestures::multipleGesturesInTree() QCOMPARE(A->events.all.count(FirstGesture), TotalGestureEventsCount); QCOMPARE(A->events.all.count(SecondGesture), 0); QCOMPARE(A->events.all.count(ThirdGesture), TotalGestureEventsCount); + + qApp->unregisterGestureRecognizer(SecondGesture); + qApp->unregisterGestureRecognizer(ThirdGesture); } void tst_Gestures::multipleGesturesInComplexTree() @@ -1139,6 +1147,13 @@ void tst_Gestures::multipleGesturesInComplexTree() QCOMPARE(A->events.all.count(FifthGesture), 0); QCOMPARE(A->events.all.count(SixthGesture), 0); QCOMPARE(A->events.all.count(SeventhGesture), 0); + + qApp->unregisterGestureRecognizer(SecondGesture); + qApp->unregisterGestureRecognizer(ThirdGesture); + qApp->unregisterGestureRecognizer(FourthGesture); + qApp->unregisterGestureRecognizer(FifthGesture); + qApp->unregisterGestureRecognizer(SixthGesture); + qApp->unregisterGestureRecognizer(SeventhGesture); } void tst_Gestures::testMapToScene() |