diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-04-13 09:01:43 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-05-29 18:31:35 +0000 |
commit | 9f27bfb31acfba49a74a342d9249f24633a7ade2 (patch) | |
tree | b156192def25d688ff924b60f1c8defadd86c351 /src/gui/kernel/qevent.cpp | |
parent | dd8e73504edbf71808d6585b7a08daddcdcbf18e (diff) |
Make sure we can build with -no-feature-draganddrop
We move QInternalMimeData to a separate file, because this class is
used, even if draganddrop is disabled. From now on, include
qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData.
Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 50d9bbb2cc..3c412903e1 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -42,16 +42,19 @@ #include "private/qguiapplication_p.h" #include "private/qtouchdevice_p.h" #include "qpa/qplatformintegration.h" -#include "qpa/qplatformdrag.h" #include "private/qevent_p.h" #include "qfile.h" #include "qhashfunctions.h" #include "qmetaobject.h" #include "qmimedata.h" -#include "private/qdnd_p.h" #include "qevent_p.h" #include "qmath.h" +#if QT_CONFIG(draganddrop) +#include <qpa/qplatformdrag.h> +#include <private/qdnd_p.h> +#endif + #include <private/qdebug_p.h> QT_BEGIN_NAMESPACE @@ -2883,7 +2886,7 @@ const QTouchDevice *QNativeGestureEvent::device() const */ #endif // QT_NO_GESTURES -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) /*! Creates a QDragMoveEvent of the required \a type indicating that the mouse is at position \a pos given within a widget. @@ -3227,7 +3230,7 @@ QDragLeaveEvent::QDragLeaveEvent() QDragLeaveEvent::~QDragLeaveEvent() { } -#endif // QT_NO_DRAGANDDROP +#endif // QT_CONFIG(draganddrop) /*! \class QHelpEvent @@ -3902,7 +3905,7 @@ static const char *eventClassName(QEvent::Type t) return "QEvent"; } -# ifndef QT_NO_DRAGANDDROP +# if QT_CONFIG(draganddrop) static void formatDropEvent(QDebug d, const QDropEvent *e) { @@ -3923,7 +3926,7 @@ static void formatDropEvent(QDebug d, const QDropEvent *e) QtDebugUtils::formatQFlags(d, e->mouseButtons()); } -# endif // !QT_NO_DRAGANDDROP +# endif // QT_CONFIG(draganddrop) # if QT_CONFIG(tabletevent) @@ -4086,13 +4089,13 @@ QDebug operator<<(QDebug dbg, const QEvent *e) dbg << ')'; } break; -# ifndef QT_NO_DRAGANDDROP +# if QT_CONFIG(draganddrop) case QEvent::DragEnter: case QEvent::DragMove: case QEvent::Drop: formatDropEvent(dbg, static_cast<const QDropEvent *>(e)); break; -# endif // !QT_NO_DRAGANDDROP +# endif // QT_CONFIG(draganddrop) case QEvent::InputMethod: formatInputMethodEvent(dbg, static_cast<const QInputMethodEvent *>(e)); break; |