diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2018-05-09 14:00:07 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2018-05-14 00:34:49 +0000 |
commit | a6b740869d369dacb8700042aa5da35183a03b5a (patch) | |
tree | 9bdaaf91028a39ae7aae2f53fc9f0477d74867b6 /src/quick/handlers/qquickpinchhandler.cpp | |
parent | 28d849c059dfe6bf957cb1fe46e66815c87d50e9 (diff) |
Fix build without features.gestures
Change-Id: Id2fb6419be9a35ddaa24106d3022e72070cb908d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index 155822197f..fc69accffc 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -248,6 +248,7 @@ bool QQuickPinchHandler::wantsPointerEvent(QQuickPointerEvent *event) if (!QQuickMultiPointHandler::wantsPointerEvent(event)) return false; +#if QT_CONFIG(gestures) if (const auto gesture = event->asPointerNativeGestureEvent()) { if (minimumPointCount() == 2) { switch (gesture->type()) { @@ -263,6 +264,7 @@ bool QQuickPinchHandler::wantsPointerEvent(QQuickPointerEvent *event) return false; } } +#endif return true; } @@ -319,6 +321,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) } qreal dist = 0; +#if QT_CONFIG(gestures) if (const auto gesture = event->asPointerNativeGestureEvent()) { switch (gesture->type()) { case Qt::EndNativeGesture: @@ -349,7 +352,9 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) m_centroidVelocity = QVector2D(); m_activeTranslation = QVector2D(); } - } else { + } else +#endif // QT_CONFIG(gestures) + { bool containsReleasedPoints = event->isReleaseEvent(); if (!active()) { // Verify that at least one of the points has moved beyond threshold needed to activate the handler |