summaryrefslogtreecommitdiff
path: root/tests/plugins
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-01-16 11:02:57 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-16 02:12:24 +0100
commitab8202129baecc46b69aef9b5fc237a4508aa383 (patch)
treea27a39245d56b9b45e62c9615cd5731400271a2b /tests/plugins
parenta9c5420c21f25442d272fd07f8127b01d2bfd73c (diff)
downloadqtlocation-ab8202129baecc46b69aef9b5fc237a4508aa383.tar.gz
Build fixes for removal of TouchPoint::Primary
see http://codereview.qt-project.org/12928 Change-Id: I3ea3223a2f5579fcef2c58d28e8fe15b82b3f4a4 Reviewed-by: David Laing <david.laing@nokia.com>
Diffstat (limited to 'tests/plugins')
-rw-r--r--tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp21
-rw-r--r--tests/plugins/declarativetestplugin/qdeclarativepinchgenerator_p.h1
2 files changed, 2 insertions, 20 deletions
diff --git a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp
index 428b0939..7aa10363 100644
--- a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp
+++ b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator.cpp
@@ -151,22 +151,6 @@ QTouchEvent::TouchPoint QDeclarativePinchGenerator::createTouchPoint(QEvent::Typ
return touchPoint;
}
-// fixme this is excessive
-QTouchEvent::TouchPoint QDeclarativePinchGenerator::convertToPrimary(QTouchEvent::TouchPoint original)
-{
- QTouchEvent::TouchPoint touchPoint;
- touchPoint.setState(original.state());
- touchPoint.setId(original.id() + 1);
- touchPoint.setPressure(original.pressure());
- touchPoint.setPos(original.pos());
- touchPoint.setLastPos(original.lastPos());
- touchPoint.setScenePos(original.scenePos());
- touchPoint.setLastScenePos(original.lastScenePos());
- touchPoint.setFlags(touchPoint.flags() | QTouchEvent::TouchPoint::Primary);
- return touchPoint;
-
-}
-
void QDeclarativePinchGenerator::mouseMoveEvent(QMouseEvent *event)
{
if (state_ != Recording || !enabled_) {
@@ -358,11 +342,10 @@ void QDeclarativePinchGenerator::timerEvent(QTimerEvent *event)
// Set touch points. Master swipe has touchpoints as it was chosen to have more touchpoints.
// For the other swipe we need to check.
QList<QTouchEvent::TouchPoint> touchPoints;
- // The primary touch point generates also mouse events. Does not work at the moment because
+ // The first touch point generates also mouse events. Does not work at the moment because
// we dispatch the touch event via canvas rather than the qApp. However qApp dispatching
// seems to miss some events arbitrarily.
- touchPoints.append(convertToPrimary(swipes_.at(masterSwipe_)->touchPoints.at(replayBookmark_)));
- //touchPoints.append(swipes_.at(masterSwipe_)->touchPoints.at(replayBookmark_));
+ touchPoints.append(swipes_.at(masterSwipe_)->touchPoints.at(replayBookmark_));
int slaveSwipe(1);
if (masterSwipe_ == 1)
diff --git a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator_p.h b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator_p.h
index f0095420..7d4254ba 100644
--- a/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator_p.h
+++ b/tests/plugins/declarativetestplugin/qdeclarativepinchgenerator_p.h
@@ -155,7 +155,6 @@ private:
void setState(GeneratorState state);
QTouchEvent::TouchPoint mouseEventToTouchPoint(QMouseEvent* event);
QTouchEvent::TouchPoint createTouchPoint(QEvent::Type type, QPoint pos);
- QTouchEvent::TouchPoint convertToPrimary(QTouchEvent::TouchPoint original);
void generateSwipe(QPoint from, QPoint to, int duration, int samples);
private: