summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol.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/widgets/qwidgettextcontrol.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/widgets/qwidgettextcontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 815cc8736b..c73dc7444c 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -58,7 +58,9 @@
#include "private/qtextdocument_p.h"
#include "qtextlist.h"
#include "private/qwidgettextcontrol_p.h"
+#if QT_CONFIG(graphicsview)
#include "qgraphicssceneevent.h"
+#endif
#include "qpagedpaintdevice.h"
#include "private/qpagedpaintdevice_p.h"
#include "qtextdocumentwriter.h"
@@ -983,7 +985,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
if (!d->contextWidget) {
switch (e->type()) {
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMouseMove:
case QEvent::GraphicsSceneMousePress:
case QEvent::GraphicsSceneMouseRelease:
@@ -1001,7 +1003,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
d->contextWidget = ev->widget();
break;
}
-#endif // QT_NO_GRAPHICSVIEW
+#endif // QT_CONFIG(graphicsview)
default: break;
};
}
@@ -1080,7 +1082,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
}
#endif
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
case QEvent::GraphicsSceneMousePress: {
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
@@ -1130,7 +1132,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source()))
ev->accept();
break; }
-#endif // QT_NO_GRAPHICSVIEW
+#endif // QT_CONFIG(graphicsview)
#ifdef QT_KEYPAD_NAVIGATION
case QEvent::EnterEditFocus:
case QEvent::LeaveEditFocus: