diff options
author | Tasuku Suzuki <tasuku.suzuki@nokia.com> | 2010-06-02 07:35:14 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-06-02 07:37:03 (GMT) |
commit | f62926954a742990a33a54ad598de1af0989d92b (patch) | |
tree | 34a392cc5c8359eac142207c3c726294c514d822 /src/gui/widgets/qabstractscrollarea.cpp | |
parent | 37a0291f932b0af0f6844898ccbce52415f0f179 (diff) | |
download | Qt-f62926954a742990a33a54ad598de1af0989d92b.zip Qt-f62926954a742990a33a54ad598de1af0989d92b.tar.gz Qt-f62926954a742990a33a54ad598de1af0989d92b.tar.bz2 |
Add a new qconfig feature GESTURES
Merge-request: 535
Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
Diffstat (limited to 'src/gui/widgets/qabstractscrollarea.cpp')
-rw-r--r-- | src/gui/widgets/qabstractscrollarea.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 8cffebd..30ce23b 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -295,8 +295,10 @@ void QAbstractScrollAreaPrivate::init() q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); layoutChildren(); #ifndef Q_WS_MAC +#ifndef QT_NO_GESTURES viewport->grabGesture(Qt::PanGesture); #endif +#endif } #ifdef Q_WS_WIN @@ -546,8 +548,10 @@ void QAbstractScrollArea::setViewport(QWidget *widget) d->viewport->setFocusProxy(this); d->viewport->installEventFilter(d->viewportFilter.data()); #ifndef Q_WS_MAC +#ifndef QT_NO_GESTURES d->viewport->grabGesture(Qt::PanGesture); #endif +#endif d->layoutChildren(); if (isVisible()) d->viewport->show(); @@ -960,6 +964,7 @@ bool QAbstractScrollArea::event(QEvent *e) case QEvent::TouchUpdate: case QEvent::TouchEnd: return false; +#ifndef QT_NO_GESTURES case QEvent::Gesture: { QGestureEvent *ge = static_cast<QGestureEvent *>(e); @@ -980,6 +985,7 @@ bool QAbstractScrollArea::event(QEvent *e) } return false; } +#endif // QT_NO_GESTURES case QEvent::StyleChange: case QEvent::LayoutDirectionChange: case QEvent::ApplicationLayoutDirectionChange: @@ -1036,9 +1042,11 @@ bool QAbstractScrollArea::viewportEvent(QEvent *e) #endif return QFrame::event(e); case QEvent::LayoutRequest: +#ifndef QT_NO_GESTURES case QEvent::Gesture: case QEvent::GestureOverride: return event(e); +#endif default: break; } |