summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qstandardgestures.cpp
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-07-23 11:31:32 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-08-15 05:10:10 +0000
commite6fad35155a25a932386ad6f8421efd74404ac7f (patch)
tree9bb2e2c71d5b2ea305937cb5046b6e26141bab18 /src/widgets/kernel/qstandardgestures.cpp
parent306071e50eac8290d234caab90985ddf705a5fc6 (diff)
Convert features.graphicsview to QT_[REQUIRE_]CONFIG
Change-Id: I1083097802772624e5d414678b4612308683a56f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/kernel/qstandardgestures.cpp')
-rw-r--r--src/widgets/kernel/qstandardgestures.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp
index 759c9864a6..8a95b12d89 100644
--- a/src/widgets/kernel/qstandardgestures.cpp
+++ b/src/widgets/kernel/qstandardgestures.cpp
@@ -43,7 +43,9 @@
#include "qevent.h"
#include "qwidget.h"
#include "qabstractscrollarea.h"
+#if QT_CONFIG(graphicsview)
#include <qgraphicssceneevent.h>
+#endif
#include "qdebug.h"
#ifndef QT_NO_GESTURES
@@ -511,7 +513,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
enum { TapRadius = 40 };
switch (event->type()) {
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMousePress: {
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
d->position = gsme->screenPos();
@@ -540,7 +542,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
}
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMouseRelease:
#endif
case QEvent::MouseButtonRelease:
@@ -563,7 +565,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMouseMove: {
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
QPoint delta = gsme->screenPos() - d->position.toPoint();