summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 41f5eddd99..9d7412340f 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -2996,12 +2996,12 @@ void QGraphicsView::contextMenuEvent(QContextMenuEvent *event)
}
#endif // QT_NO_CONTEXTMENU
+#if QT_CONFIG(draganddrop)
/*!
\reimp
*/
void QGraphicsView::dropEvent(QDropEvent *event)
{
-#ifndef QT_NO_DRAGANDDROP
Q_D(QGraphicsView);
if (!d->scene || !d->sceneInteractionAllowed)
return;
@@ -3020,10 +3020,6 @@ void QGraphicsView::dropEvent(QDropEvent *event)
delete d->lastDragDropEvent;
d->lastDragDropEvent = 0;
-
-#else
- Q_UNUSED(event)
-#endif
}
/*!
@@ -3031,7 +3027,6 @@ void QGraphicsView::dropEvent(QDropEvent *event)
*/
void QGraphicsView::dragEnterEvent(QDragEnterEvent *event)
{
-#ifndef QT_NO_DRAGANDDROP
Q_D(QGraphicsView);
if (!d->scene || !d->sceneInteractionAllowed)
return;
@@ -3054,9 +3049,6 @@ void QGraphicsView::dragEnterEvent(QDragEnterEvent *event)
event->setAccepted(true);
event->setDropAction(sceneEvent.dropAction());
}
-#else
- Q_UNUSED(event)
-#endif
}
/*!
@@ -3064,7 +3056,6 @@ void QGraphicsView::dragEnterEvent(QDragEnterEvent *event)
*/
void QGraphicsView::dragLeaveEvent(QDragLeaveEvent *event)
{
-#ifndef QT_NO_DRAGANDDROP
Q_D(QGraphicsView);
if (!d->scene || !d->sceneInteractionAllowed)
return;
@@ -3094,9 +3085,6 @@ void QGraphicsView::dragLeaveEvent(QDragLeaveEvent *event)
// Accept the originating event if the scene accepted the scene event.
if (sceneEvent.isAccepted())
event->setAccepted(true);
-#else
- Q_UNUSED(event)
-#endif
}
/*!
@@ -3104,7 +3092,6 @@ void QGraphicsView::dragLeaveEvent(QDragLeaveEvent *event)
*/
void QGraphicsView::dragMoveEvent(QDragMoveEvent *event)
{
-#ifndef QT_NO_DRAGANDDROP
Q_D(QGraphicsView);
if (!d->scene || !d->sceneInteractionAllowed)
return;
@@ -3123,10 +3110,8 @@ void QGraphicsView::dragMoveEvent(QDragMoveEvent *event)
event->setAccepted(sceneEvent.isAccepted());
if (sceneEvent.isAccepted())
event->setDropAction(sceneEvent.dropAction());
-#else
- Q_UNUSED(event)
-#endif
}
+#endif // QT_CONFIG(draganddrop)
/*!
\reimp