don't try to treat touch events as mose ones

crash--

svn path=/trunk/KDE/kdelibs/; revision=1200789
This commit is contained in:
Marco Martin 2010-11-25 19:30:55 +00:00
parent 5eb44c3f0d
commit 0d168b6c57

View File

@ -1489,10 +1489,7 @@ bool ScrollWidget::sceneEventFilter(QGraphicsItem *i, QEvent *e)
break; break;
case QEvent::GraphicsSceneWheel: case QEvent::GraphicsSceneWheel:
d->handleWheelEvent(static_cast<QGraphicsSceneWheelEvent*>(e)); d->handleWheelEvent(static_cast<QGraphicsSceneWheelEvent*>(e));
//Multitouch related events //Multitouch related events, we actually need only TouchUpdate
case QEvent::TouchBegin:
d->handleMousePressEvent(static_cast<QGraphicsSceneMouseEvent*>(e));
break;
case QEvent::TouchUpdate: { case QEvent::TouchUpdate: {
QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(e)->touchPoints(); QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>(e)->touchPoints();
if (touchPoints.count() == 2) { if (touchPoints.count() == 2) {
@ -1537,9 +1534,6 @@ bool ScrollWidget::sceneEventFilter(QGraphicsItem *i, QEvent *e)
} }
break; break;
} }
case QEvent::TouchEnd:
d->handleMouseReleaseEvent(static_cast<QGraphicsSceneMouseEvent*>(e));
break;
default: default:
break; break;
} }