diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 01c8b11..fcc8d30 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3606,11 +3606,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) if (!d->grabbedGestures.isEmpty() && e->spontaneous() && receiver->isWidgetType()) { const QEvent::Type t = e->type(); - if (t == QEvent::MouseButtonPress || t == QEvent::MouseButtonRelease || t == QEvent::MouseMove - || t == QEvent::MouseButtonDblClick || t == QEvent::Wheel - || t == QEvent::KeyPress || t == QEvent::KeyRelease - || t == QEvent::TabletPress || t == QEvent::TabletRelease || t == QEvent::TabletMove - || t >= QEvent::User) { + if (t != QEvent::Gesture && t != QEvent::GraphicsSceneGesture) { if (QGestureManager::instance()->filterEvent(static_cast<QWidget*>(receiver), e)) return true; } diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 799bcfd..a1d55fa 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -176,8 +176,6 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event) gesture->d_func()->singleshot = false; } } - Q_ASSERT(!started.isEmpty()); - ret = sendGestureEvent(receiver, started, QSet<QGesture*>()); if (!activeGestures.isEmpty()) { DEBUG() << "QGestureManager: new state = Gesture"; @@ -189,6 +187,9 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event) DEBUG() << "QGestureManager: new state = NotGesture"; state = NotGesture; } + + Q_ASSERT(!started.isEmpty()); + ret = sendGestureEvent(receiver, started, QSet<QGesture*>()); } else if (!maybeGestures.isEmpty()) { if (state != MaybeGesture) { // We got a new set of events that look like a start |