aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers/qquickpinchhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/handlers/qquickpinchhandler.cpp')
-rw-r--r--src/quick/handlers/qquickpinchhandler.cpp7
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