summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-08 14:06:27 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-15 12:55:58 (GMT)
commit948e68ffa22e9b584f0612e3c67ad46a68a09746 (patch)
treeaee0fcd9914f691d2e9ebdccf42f722e5e58d9f0
parentf04eafcc816de608aad64b9cf1132cfd421642ca (diff)
downloadQt-948e68ffa22e9b584f0612e3c67ad46a68a09746.zip
Qt-948e68ffa22e9b584f0612e3c67ad46a68a09746.tar.gz
Qt-948e68ffa22e9b584f0612e3c67ad46a68a09746.tar.bz2
Compile fix after the multitouch api review.
-rw-r--r--tests/auto/gestures/customgesturerecognizer.cpp22
-rw-r--r--tests/auto/gestures/tst_gestures.cpp6
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/gestures/customgesturerecognizer.cpp b/tests/auto/gestures/customgesturerecognizer.cpp
index c76475e..12d07b1 100644
--- a/tests/auto/gestures/customgesturerecognizer.cpp
+++ b/tests/auto/gestures/customgesturerecognizer.cpp
@@ -121,24 +121,24 @@ QGestureRecognizer::Result PanGestureRecognizer::filterEvent(const QEvent *event
return QGestureRecognizer::Ignore;
const QTouchEvent *e = static_cast<const QTouchEvent*>(event);
- const QList<QTouchEvent::TouchPoint*> &points = e->touchPoints();
+ const QList<QTouchEvent::TouchPoint> &points = e->touchPoints();
if (points.size() >= 1) {
gesture->lastPoints[0] = gesture->points[0];
- gesture->points[0].id = points.at(0)->id();
- gesture->points[0].pt = points.at(0)->startPos().toPoint();
- gesture->points[0].state = (TouchPoint::State)points.at(0)->state();
- if (points.at(0)->state() == Qt::TouchPointPressed) {
+ gesture->points[0].id = points.at(0).id();
+ gesture->points[0].pt = points.at(0).startPos().toPoint();
+ gesture->points[0].state = (TouchPoint::State)points.at(0).state();
+ if (points.at(0).state() == Qt::TouchPointPressed) {
gesture->startPoints[0] = gesture->points[0];
gesture->lastPoints[0] = gesture->points[0];
}
}
if (points.size() >= 2) {
gesture->lastPoints[1] = gesture->points[1];
- gesture->points[1].id = points.at(1)->id();
- gesture->points[1].pt = points.at(1)->startPos().toPoint();
- gesture->points[1].state = (TouchPoint::State)points.at(1)->state();
- if (points.at(1)->state() == Qt::TouchPointPressed) {
+ gesture->points[1].id = points.at(1).id();
+ gesture->points[1].pt = points.at(1).startPos().toPoint();
+ gesture->points[1].state = (TouchPoint::State)points.at(1).state();
+ if (points.at(1).state() == Qt::TouchPointPressed) {
gesture->startPoints[1] = gesture->points[1];
gesture->lastPoints[1] = gesture->points[1];
}
@@ -148,9 +148,9 @@ QGestureRecognizer::Result PanGestureRecognizer::filterEvent(const QEvent *event
return QGestureRecognizer::GestureStarted;
if (points.size() > 2)
return QGestureRecognizer::MaybeGesture;
- if (points.at(0)->state() == Qt::TouchPointPressed)
+ if (points.at(0).state() == Qt::TouchPointPressed)
return QGestureRecognizer::MaybeGesture;
- if (points.at(0)->state() == Qt::TouchPointReleased)
+ if (points.at(0).state() == Qt::TouchPointReleased)
return QGestureRecognizer::GestureFinished;
return QGestureRecognizer::GestureStarted;
}
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index 8df856d..9c9d279 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -447,13 +447,13 @@ public:
protected:
bool sceneEvent(QEvent *event)
{
- if (event->type() == QEvent::GraphicsSceneTouchBegin) {
+ if (event->type() == QEvent::TouchBegin) {
event->accept();
++touch.seenTouchBeginEvent;
return true;
- } else if (event->type() == QEvent::GraphicsSceneTouchUpdate) {
+ } else if (event->type() == QEvent::TouchUpdate) {
++touch.seenTouchUpdateEvent;
- } else if (event->type() == QEvent::GraphicsSceneTouchEnd) {
+ } else if (event->type() == QEvent::TouchEnd) {
++touch.seenTouchEndEvent;
} else if (event->type() == QEvent::GraphicsSceneGesture) {
QGraphicsSceneGestureEvent *e = static_cast<QGraphicsSceneGestureEvent*>(event);