From 948e68ffa22e9b584f0612e3c67ad46a68a09746 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 8 Jun 2009 16:06:27 +0200 Subject: Compile fix after the multitouch api review. --- tests/auto/gestures/customgesturerecognizer.cpp | 22 +++++++++++----------- tests/auto/gestures/tst_gestures.cpp | 6 +++--- 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(event); - const QList &points = e->touchPoints(); + const QList &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(event); -- cgit v0.12