diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-22 11:05:49 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-27 16:04:30 (GMT) |
commit | 2a2ffa9231ce4f7bcb3c7e4ae93337b9e4cb2772 (patch) | |
tree | a4e2b760e7823ed9b53163e35670ad0b16b142aa /src | |
parent | b8684b3520c561325746782952c980b168367d64 (diff) | |
download | Qt-2a2ffa9231ce4f7bcb3c7e4ae93337b9e4cb2772.zip Qt-2a2ffa9231ce4f7bcb3c7e4ae93337b9e4cb2772.tar.gz Qt-2a2ffa9231ce4f7bcb3c7e4ae93337b9e4cb2772.tar.bz2 |
Capture keyboard modifiers for touch events
Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index f1c5f34..88b9a66 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3579,14 +3579,14 @@ bool QApplication::notify(QObject *receiver, QEvent *e) QApplicationPrivate::mouse_buttons |= me->button(); else QApplicationPrivate::mouse_buttons &= ~me->button(); - } -#if !defined(QT_NO_WHEELEVENT) || !defined(QT_NO_TABLETEVENT) - else if ( + } else if (e->type() == QEvent::TouchBegin + || e->type() == QEvent::TouchUpdate + || e->type() == QEvent::TouchEnd # ifndef QT_NO_WHEELEVENT - e->type() == QEvent::Wheel || + || e->type() == QEvent::Wheel # endif # ifndef QT_NO_TABLETEVENT - e->type() == QEvent::TabletMove + || e->type() == QEvent::TabletMove || e->type() == QEvent::TabletPress || e->type() == QEvent::TabletRelease # endif @@ -3594,7 +3594,6 @@ bool QApplication::notify(QObject *receiver, QEvent *e) QInputEvent *ie = static_cast<QInputEvent*>(e); QApplicationPrivate::modifier_buttons = ie->modifiers(); } -#endif // !QT_NO_WHEELEVENT || !QT_NO_TABLETEVENT } if (!d->grabbedGestures.isEmpty() && e->spontaneous() && receiver->isWidgetType()) { |