diff options
author | Tobias Koenig <tobias.koenig@kdab.com> | 2015-09-21 11:45:14 +0200 |
---|---|---|
committer | Tobias Koenig <tobias.koenig@kdab.com> | 2015-09-22 07:02:55 +0000 |
commit | 071b265e12a4996fcbbfc5874094256b094e44a2 (patch) | |
tree | e2ade97034863a6479985d602cc849e3804d715d | |
parent | 7c74c443362dd62f41b01b5e6eae705b93685935 (diff) |
Fix compilation of QtDeclarative with QT_NO_GESTURES
Allow to compile QtDeclarative module with QT_NO_GESTURES
define enabled.
Change-Id: I5335f97c675d75c71c81edcc8307338ed3571663
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
-rw-r--r-- | src/quick/items/qquickitem.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickpincharea.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquickwindow_p.h | 2 |
4 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 5fd1882216..ac3f8b2433 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -7310,9 +7310,11 @@ bool QQuickItem::event(QEvent *ev) dropEvent(static_cast<QDropEvent*>(ev)); break; #endif // QT_NO_DRAGANDDROP +#ifndef QT_NO_GESTURES case QEvent::NativeGesture: ev->ignore(); break; +#endif // QT_NO_GESTURES default: return QObject::event(ev); } diff --git a/src/quick/items/qquickpincharea.cpp b/src/quick/items/qquickpincharea.cpp index 07bf268309..f419d570f3 100644 --- a/src/quick/items/qquickpincharea.cpp +++ b/src/quick/items/qquickpincharea.cpp @@ -765,11 +765,11 @@ bool QQuickPinchArea::event(QEvent *event) d->pinchRotation = angle; updatePinchTarget(); } break; -#endif // QT_NO_GESTURES default: return QQuickItem::event(event); } } break; +#endif // QT_NO_GESTURES case QEvent::Wheel: event->ignore(); return false; diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 5958edf29f..76daa44225 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1400,9 +1400,11 @@ bool QQuickWindow::event(QEvent *e) d->windowManager->handleUpdateRequest(this); break; } +#ifndef QT_NO_GESTURES case QEvent::NativeGesture: d->deliverNativeGestureEvent(d->contentItem, static_cast<QNativeGestureEvent*>(e)); break; +#endif default: break; } @@ -1779,6 +1781,7 @@ void QQuickWindow::wheelEvent(QWheelEvent *event) } #endif // QT_NO_WHEELEVENT +#ifndef QT_NO_GESTURES bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGestureEvent *event) { QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); @@ -1810,6 +1813,7 @@ bool QQuickWindowPrivate::deliverNativeGestureEvent(QQuickItem *item, QNativeGes return false; } +#endif // QT_NO_GESTURES bool QQuickWindowPrivate::deliverTouchCancelEvent(QTouchEvent *event) { diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h index 605a36fb1d..b63143178b 100644 --- a/src/quick/items/qquickwindow_p.h +++ b/src/quick/items/qquickwindow_p.h @@ -145,7 +145,9 @@ public: #ifndef QT_NO_WHEELEVENT bool deliverWheelEvent(QQuickItem *, QWheelEvent *); #endif +#ifndef QT_NO_GESTURES bool deliverNativeGestureEvent(QQuickItem *, QNativeGestureEvent *); +#endif bool deliverTouchPoints(QQuickItem *, QTouchEvent *, const QList<QTouchEvent::TouchPoint> &, QSet<int> *, QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *, QSet<QQuickItem*> *filtered); void deliverTouchEvent(QTouchEvent *); |