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/plugins/platforms/xcb/qxcbconnection.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/plugins/platforms/xcb/qxcbconnection.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbconnection.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 444e3a7669..879d31f29a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -46,7 +46,9 @@ #include "qxcbscreen.h" #include "qxcbwindow.h" #include "qxcbclipboard.h" +#if QT_CONFIG(draganddrop) #include "qxcbdrag.h" +#endif #include "qxcbwmsupport.h" #include "qxcbnativeinterface.h" #include "qxcbintegration.h" @@ -604,7 +606,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra #ifndef QT_NO_CLIPBOARD m_clipboard = new QXcbClipboard(this); #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) m_drag = new QXcbDrag(this); #endif @@ -648,7 +650,7 @@ QXcbConnection::~QXcbConnection() #ifndef QT_NO_CLIPBOARD delete m_clipboard; #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) delete m_drag; #endif if (m_reader && m_reader->isRunning()) { @@ -1139,7 +1141,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) #if QT_CONFIG(draganddrop) || QT_CONFIG(clipboard) xcb_selection_request_event_t *sr = reinterpret_cast<xcb_selection_request_event_t *>(event); #endif -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) if (sr->selection == atom(QXcbAtom::XdndSelection)) m_drag->handleSelectionRequest(sr); else @@ -1802,7 +1804,7 @@ void QXcbConnection::handleClientMessageEvent(const xcb_client_message_event_t * if (event->format != 32) return; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) if (event->type == atom(QXcbAtom::XdndStatus)) { drag()->handleStatus(event); } else if (event->type == atom(QXcbAtom::XdndFinished)) { |