summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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: