Diaglib: Add gesture events to event filter.

Task-number: QTBUG-45134
Task-number: QTBUG-45120
Change-Id: I9b2420ec302dfff173fbc8e3173d6ef0fcf095e0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
This commit is contained in:
Friedemann Kleint 2015-03-20 09:06:30 +01:00
parent 09a06c7171
commit 3e503b197d
2 changed files with 7 additions and 0 deletions

View File

@ -140,6 +140,12 @@ void EventFilter::init(EventCategories eventCategories)
m_eventTypes << QEvent::InputMethodQuery;
#endif
}
#ifndef QT_NO_GESTURES
if (eventCategories & GestureEvents) {
m_eventTypes << QEvent::Gesture << QEvent::GestureOverride
<< QEvent::NativeGesture;
}
#endif
}
static inline bool matchesType(const QObject *o, EventFilter::ObjectTypes types)

View File

@ -59,6 +59,7 @@ public:
InputMethodEvents = 0x00400,
TimerEvents = 0x00800,
ObjectEvents = 0x01000,
GestureEvents = 0x02000,
AllEvents = 0xFFFFF
};
Q_DECLARE_FLAGS(EventCategories, EventCategory)