summaryrefslogtreecommitdiffstats
path: root/src/other/swipemodefilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other/swipemodefilter.cpp')
-rw-r--r--src/other/swipemodefilter.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/other/swipemodefilter.cpp b/src/other/swipemodefilter.cpp
index dbc3ae2..43d0b34 100644
--- a/src/other/swipemodefilter.cpp
+++ b/src/other/swipemodefilter.cpp
@@ -52,6 +52,7 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
{
Widget *widget = static_cast<Widget *>(watched);
QGraphicsSceneMouseEvent *ev = 0;
+ QtSimulatorPrivate::TouchEventData touchEvent;
switch (event->type()) {
case QEvent::GraphicsSceneMousePress:
ev = static_cast<QGraphicsSceneMouseEvent *>(event);
@@ -103,6 +104,8 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
touchEvent);
}
return true;
+ default:
+ return true;
}
break;
case QEvent::GraphicsSceneMouseRelease:
@@ -117,8 +120,8 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
case updateSecondPoint:
mState = setThirdPoint;
return true;
- case 5:
- QtSimulatorPrivate::TouchEventData touchEvent = createTouchEventFromMouseEvent(widget, ev);
+ case updateThirdPoint:
+ touchEvent = createTouchEventFromMouseEvent(widget, ev);
QtSimulatorPrivate::RemoteMetacall<void>::call(widget->owner->socket(),
QtSimulatorPrivate::NoSync,
"dispatchTouchEvent",
@@ -126,6 +129,8 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
touchEvent);
mState = updateThirdPoint;
return true;
+ default:
+ return true;
}
break;
case QEvent::GraphicsSceneMouseMove:
@@ -137,7 +142,7 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
case updateSecondPoint:
mValuePoints[1]->setCenter(ev->pos());
return true;
- case updateThirdPoint:
+ case updateThirdPoint: {
mValuePoints[2]->setCenter(ev->pos());
mValuePoints[1]->setCenter(mValuePoints[2]->center() - mDiff1);
mValuePoints[0]->setCenter(mValuePoints[2]->center() - mDiff2);
@@ -148,9 +153,10 @@ bool SwipeModeFilter::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
widget->widgetId,
touchEvent);
return true;
+ } default:
+ return true;
}
break;
-
default:
break;
}