summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-19 15:21:59 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-10-22 14:59:19 (GMT)
commit75599a71e957cae29ddd4d3df9e89d9d4edc0b3d (patch)
tree0089cdcb083296b5e4e3c9ef8e024e61bcac658f
parent0c7254e1c5a20450495afe80c1ad5246e5e48314 (diff)
downloadQt-75599a71e957cae29ddd4d3df9e89d9d4edc0b3d.zip
Qt-75599a71e957cae29ddd4d3df9e89d9d4edc0b3d.tar.gz
Qt-75599a71e957cae29ddd4d3df9e89d9d4edc0b3d.tar.bz2
Fix for the gestures autotest.
Reviewed-by: trustme
-rw-r--r--src/gui/kernel/qgesturemanager.cpp3
-rw-r--r--tests/auto/gestures/tst_gestures.cpp14
2 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index b4913f0..6f1aec4 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -456,8 +456,9 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
normalStartedGestures[target].append(gesture);
}
} else {
- qWarning() << "QGestureManager::deliverEvent: could not find the target for gesture"
+ DEBUG() << "QGestureManager::deliverEvent: could not find the target for gesture"
<< gesture->gestureType();
+ qWarning("QGestureManager::deliverEvent: could not find the target for gesture");
undeliveredGestures->insert(gesture);
}
}
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index 28dd40c..0c09265 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -703,18 +703,16 @@ void tst_Gestures::graphicsItemGesture()
static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1;
CustomEvent event;
+ // gesture without hotspot should not be delivered to items in the view
+ QTest::ignoreMessage(QtWarningMsg, "QGestureManager::deliverEvent: could not find the target for gesture");
+ QTest::ignoreMessage(QtWarningMsg, "QGestureManager::deliverEvent: could not find the target for gesture");
+ QTest::ignoreMessage(QtWarningMsg, "QGestureManager::deliverEvent: could not find the target for gesture");
+ QTest::ignoreMessage(QtWarningMsg, "QGestureManager::deliverEvent: could not find the target for gesture");
sendCustomGesture(&event, item, &scene);
QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
- QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureEventsReceived, 0);
QCOMPARE(item->gestureOverrideEventsReceived, 0);
- QCOMPARE(item->events.all.size(), TotalGestureEventsCount);
- for(int i = 0; i < item->events.all.size(); ++i)
- QCOMPARE(item->events.all.at(i), CustomGesture::GestureType);
- QCOMPARE(item->events.started.size(), 1);
- QCOMPARE(item->events.updated.size(), TotalGestureEventsCount - 2);
- QCOMPARE(item->events.finished.size(), 1);
- QCOMPARE(item->events.canceled.size(), 0);
item->reset();