Fixed broken if.

svn path=/trunk/KDE/kdelibs/; revision=1094587
This commit is contained in:
Davide Bettio 2010-02-22 23:15:09 +00:00
parent 46eb95e995
commit abe1ca242a
2 changed files with 7 additions and 1 deletions

View File

@ -166,7 +166,7 @@ bool AnimableGraphicsWebView::event(QEvent * event)
void AnimableGraphicsWebView::gestureEvent(QGestureEvent *event) void AnimableGraphicsWebView::gestureEvent(QGestureEvent *event)
{ {
if (QGesture *pinch == event->gesture(Qt::PinchGesture)){ if (QGesture *pinch = event->gesture(Qt::PinchGesture)){
QPinchGesture *pinchGesture = static_cast<QPinchGesture *>(pinch); QPinchGesture *pinchGesture = static_cast<QPinchGesture *>(pinch);
setZoomFactor(zoomFactor() * pinchGesture->scaleFactor()); setZoomFactor(zoomFactor() * pinchGesture->scaleFactor());
} }

View File

@ -731,6 +731,7 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
bool AppletHandle::sceneEvent(QEvent *event) bool AppletHandle::sceneEvent(QEvent *event)
{ {
switch (event->type()) { switch (event->type()) {
#if 0
case QEvent::TouchEnd: { case QEvent::TouchEnd: {
QTransform t = m_applet->transform(); QTransform t = m_applet->transform();
QRectF geom = m_applet->geometry(); QRectF geom = m_applet->geometry();
@ -778,6 +779,11 @@ bool AppletHandle::sceneEvent(QEvent *event)
} }
return true; return true;
#endif
case QEvent::Gesture
{
QGesture *gesture = static_cast<QGestureEvent*>(event);
return true;
} }
default: default:
break; break;